Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Index-Name, using ResourceChannel, ResourceLocation and ResourceLangauge #3

Merged
merged 152 commits into from
May 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
152 commits
Select commit Hold shift + click to select a range
702b9d2
feat: initial implementation
sitepark-veltrup Nov 29, 2023
e1439a7
refactor: Various changes following internal coordination
sitepark-veltrup Nov 30, 2023
ec432ba
feat: filter key is optional
sitepark-veltrup Dec 1, 2023
124de81
fix: only url field required
sitepark-veltrup Dec 4, 2023
68352eb
feat: add background indexer
sitepark-veltrup Dec 7, 2023
97b92c7
feat: indexer extended
sitepark-veltrup Dec 11, 2023
2b7fcc9
refactor: indexing by paths, aborter
sitepark-veltrup Dec 13, 2023
b49edc7
chore: composer update
sitepark-veltrup Dec 13, 2023
d65b54c
feat: add chunkSize parameter, remove by idList
sitepark-veltrup Dec 18, 2023
1bcebac
refactor: Rename ResourceSearchResult to SearchResult
sitepark-veltrup Dec 19, 2023
2de4c02
feat: sorting
sitepark-veltrup Jan 9, 2024
8c29ad8
chore: composer update
sitepark-veltrup Jan 9, 2024
3bb7e17
feat: and, or, not filter
sitepark-veltrup Jan 9, 2024
28aee3a
feat: query-filter
sitepark-veltrup Jan 9, 2024
1f9d75c
feat: translation-splitter
sitepark-veltrup Jan 17, 2024
183eab0
feat: IndexSchema2xDocument implementation
sitepark-veltrup Jan 18, 2024
242c169
refactor: DefaultSchema21DocumentEnricher -> DocumentEnricherSiteKitS…
sitepark-veltrup Jan 18, 2024
5ba12f4
feat: nullable strings for index-documents
sitepark-veltrup Jan 18, 2024
f4c1751
Merge branch 'main' into feature/initial-implementation
sitepark-veltrup Jan 19, 2024
e7021d6
feat: stability
sitepark-veltrup Jan 23, 2024
5f16d14
fix: error message
sitepark-veltrup Jan 23, 2024
086e90b
feat: cache error, to see the right location
sitepark-veltrup Jan 23, 2024
d735303
fix: indexing
sitepark-veltrup Jan 23, 2024
0707410
feat: Support translation information such as /path?loc=en_US
sitepark-veltrup Jan 24, 2024
14e0d3d
test: tests made runnable again
sitepark-veltrup Jan 29, 2024
377bb7e
fix: phpstan errors
sitepark-veltrup Jan 30, 2024
9611662
fix: phpcs errors
sitepark-veltrup Jan 30, 2024
2af8c75
docs: add phpstan badge
sitepark-veltrup Jan 30, 2024
06ccb04
docs: add php badge
sitepark-veltrup Jan 30, 2024
4d09f3a
docs: add php badge
sitepark-veltrup Jan 30, 2024
0800eaf
docs: update codecov badge
sitepark-veltrup Jan 30, 2024
aa54d36
test: fix test
sitepark-veltrup Jan 30, 2024
f877a2d
test: new tests for Index-Command
sitepark-veltrup Jan 31, 2024
52deb6b
test: add more tests
sitepark-veltrup Jan 31, 2024
41806d3
fix: phpsc error
sitepark-veltrup Jan 31, 2024
cf32291
test: fix test for ci-server
sitepark-veltrup Jan 31, 2024
52da0f6
feat: cli command atoolo:dump-index-document
sitepark-veltrup Feb 13, 2024
7f1ccbe
feat(indexer): use intro as description if description is not defined
sitepark-veltrup Feb 14, 2024
abcd512
feat: rename config/services.yml -> config/commands.yml
sitepark-veltrup Feb 15, 2024
c40d02d
feat: content matcher to index full-text-content
sitepark-veltrup Feb 15, 2024
6222660
feat: add category name to full-text content
sitepark-veltrup Feb 15, 2024
aaa78a0
refactor: simplify dto's
sitepark-veltrup Feb 20, 2024
8856dac
refactor: QueryDefaultOperator as backed enum
sitepark-veltrup Feb 20, 2024
e05ba48
test: add dto tests
sitepark-veltrup Feb 22, 2024
0b441b5
test: add more tests
sitepark-veltrup Feb 23, 2024
586301a
test: add more tests
sitepark-veltrup Feb 26, 2024
3d1062b
Resource base locator unified
sitepark-veltrup Feb 27, 2024
f1000ea
docs: update README.md
sitepark-veltrup Feb 27, 2024
d8530b6
docs: update class documentation for SolrIndexer
sitepark-veltrup Feb 27, 2024
0e927a8
fix: remove debug code
sitepark-veltrup Feb 27, 2024
6f71e7c
docs: update phpdoc
sitepark-veltrup Mar 1, 2024
358acfd
style: fix max line length
sitepark-veltrup Mar 1, 2024
441bea3
refactor: change filter constructor
sitepark-veltrup Mar 1, 2024
2920d51
feat: excludeFilter for facet dto is optional
sitepark-veltrup Mar 4, 2024
2b5aae2
fix: php warnings
sitepark-veltrup Mar 5, 2024
b32ddec
fix : IndexDocumentDumperBuilder must use ResourceBaseLocatorBuilder
sitepark-veltrup Mar 7, 2024
5f30c8b
feat: IndexSchema2xDocument::setMetaString must also accept arrays
sitepark-veltrup Mar 7, 2024
c1b2473
feat: add IndexSchema2xDocument::setMetaBool()
sitepark-veltrup Mar 7, 2024
299485a
refactor: extract SolrIndexService
sitepark-veltrup Mar 12, 2024
a644145
fix: analyser tests
sitepark-veltrup Mar 12, 2024
6c2a775
feat: date_from and date_to for DefaultSchema2xRceEventDocumentEnricher
sitepark-veltrup Mar 12, 2024
cc386ba
feat: add IndexSchema2xDocument::setMetaText()
sitepark-veltrup Mar 12, 2024
8f95a63
feat: add contenttype field for index-document
sitepark-veltrup Mar 13, 2024
7f628bb
chore: work in process
sitepark-veltrup Mar 15, 2024
7b744bb
ci: trigger rebuild
sitepark-veltrup Mar 15, 2024
0a37638
refactor: renmae QueryDefaultOperator to DefaultQueryOperator
sitepark-veltrup Mar 18, 2024
212ae44
chore: add branch-alias for feature/core-name
sitepark-veltrup Mar 19, 2024
77fa020
Merge branch 'feature/initial-implementation' into feature/core-name
sitepark-veltrup Mar 19, 2024
ab87006
refactor: renme DefaultQueryOperator to QueryOperator
sitepark-veltrup Mar 20, 2024
a81707a
Merge branch 'feature/initial-implementation' into feature/core-name
sitepark-veltrup Mar 20, 2024
e10800d
refactore: automatic index determination including multi-lang indexes
sitepark-veltrup Mar 21, 2024
067f65a
chore: composer update
sitepark-veltrup Mar 21, 2024
56aa128
chore: composer update
sitepark-veltrup Mar 21, 2024
7513a47
docs: fix incorrect grammar
sitepark-veltrup Mar 21, 2024
a0cbf2d
style: fix code style
sitepark-veltrup Mar 21, 2024
acab5c3
style: fix indent
sitepark-veltrup Mar 21, 2024
5325c82
style: string concatenation
sitepark-veltrup Mar 21, 2024
cd9c8fd
refactore: text argument as string
sitepark-veltrup Mar 21, 2024
ca7e76b
refactore: terms argument as string
sitepark-veltrup Mar 21, 2024
913148b
refactor IndexerStatusState::INDEXED to IndexerStatusState::FINISHED
sitepark-veltrup Mar 21, 2024
52bd921
refactor: builder methods could return static
sitepark-veltrup Mar 21, 2024
26a5d7c
fix: exception message
sitepark-veltrup Mar 21, 2024
e1ea53a
refactor: default values for all members
sitepark-veltrup Mar 21, 2024
e0bc293
refactor: inherited and meta fields
sitepark-veltrup Mar 21, 2024
da8eef3
refactor: inherited and meta fields
sitepark-veltrup Mar 21, 2024
b07662d
style: fix empty line
sitepark-veltrup Mar 21, 2024
401ce2a
refactore: create dir recursive
sitepark-veltrup Mar 21, 2024
1c40c70
refactore: create the serializer in the constructor
sitepark-veltrup Mar 21, 2024
78541dc
refactore: aborter method names
sitepark-veltrup Mar 21, 2024
76f2980
refactore: rename method mapTranslationPaths() to normalizePaths()
sitepark-veltrup Mar 21, 2024
2b1ec13
refactore: ContentMatcher::match() return type and phpdoc added
sitepark-veltrup Mar 21, 2024
2637fbf
refactor: upate phpstan-type for QuoteSectionMatcher
sitepark-veltrup Mar 21, 2024
24f32ab
refactor: rename SolrIndexService::getAvailableIndexes to SolrIndexSe…
sitepark-veltrup Mar 21, 2024
6bee895
feat: add sp_id to external resources
sitepark-veltrup Mar 21, 2024
0ebb699
refactor: if $len is uneven we run into an error
sitepark-veltrup Mar 21, 2024
da65a68
refactor: Apply suggestions from code review
sitepark-veltrup Mar 21, 2024
7f0911d
test: fix tests
sitepark-veltrup Mar 21, 2024
f4bdbd2
refactor: reduce code
sitepark-veltrup Mar 21, 2024
914ffb7
Merge branch 'feature/initial-implementation' into feature/core-name
sitepark-veltrup Mar 21, 2024
47e5287
refactor: rename SolrIndexService::getManagedIndexes() to SolrIndexSe…
sitepark-veltrup Mar 21, 2024
b3925fd
refactor: reduce code duplications
sitepark-veltrup Mar 21, 2024
7764bd6
refactor: cleanup code
sitepark-veltrup Mar 21, 2024
054c64d
refactor: cleanup code
sitepark-veltrup Mar 21, 2024
afbf8d9
feat: add indexer-filter
sitepark-veltrup Mar 22, 2024
f79b342
Merge branch 'main' into feature/initial-implementation
sitepark-veltrup Mar 22, 2024
e0769e3
Merge branch 'feature/initial-implementation' into feature/core-name
sitepark-veltrup Mar 22, 2024
784cb4e
test: fix test for intexer-filter
sitepark-veltrup Mar 22, 2024
5c956fa
refactor: rename Select to Search
sitepark-veltrup Mar 22, 2024
1a2081d
refactor Suggest::search to Suggest::suggest
sitepark-veltrup Mar 22, 2024
3d819f0
refactor Searcher to Search
sitepark-veltrup Mar 22, 2024
795241f
refactor: rename IndexerFilter to ResourceFilter
sitepark-veltrup Mar 22, 2024
be69fb5
fix: service configuration
sitepark-veltrup Mar 22, 2024
9f986eb
feat: outputs the channel for the cli commandos
sitepark-veltrup Mar 22, 2024
ac00376
test: fix tests
sitepark-veltrup Mar 22, 2024
deb8d23
refactor: path for dump-index-document is required
sitepark-veltrup Mar 25, 2024
9abecb7
docs: add param doc for MoreLikeThisQuery::fields
sitepark-veltrup Mar 25, 2024
083230c
refactor: reduce code
sitepark-veltrup Mar 25, 2024
d56a128
Merge branch 'feature/initial-implementation' into feature/core-name
sitepark-veltrup Mar 25, 2024
6be96d6
feat: IndexCollection
sitepark-veltrup Mar 28, 2024
6d736d8
fix: phpstan errors
sitepark-veltrup Apr 2, 2024
5b74bac
refactor: use named arguments
sitepark-veltrup Apr 2, 2024
080645c
test: tests adjusted after refactoring
sitepark-veltrup Apr 2, 2024
c3fff86
feat: add source option for indexer cli
sitepark-veltrup Apr 2, 2024
9653151
test: add more tests
sitepark-veltrup Apr 2, 2024
ddc1f74
style: fix codestyles
sitepark-veltrup Apr 2, 2024
73c230c
fix: get indexer status
sitepark-veltrup Apr 9, 2024
958ca86
feat: timeout for solr requests increased to 30 seconds.
sitepark-veltrup Apr 9, 2024
ac95e5e
fix: add filter without key
sitepark-veltrup Apr 9, 2024
98400b5
feat: DefaultQueryOperator is now 'OR' if not set
sitepark-veltrup Apr 9, 2024
085b3b0
refactor: indexUpdate
sitepark-veltrup Apr 10, 2024
23a8796
test: fix tests
sitepark-veltrup Apr 10, 2024
57de5c5
feat: add indexer preparing state
sitepark-veltrup Apr 10, 2024
956eb4a
feat: resource-layout indexer config location
sitepark-veltrup Apr 15, 2024
a7e6f3f
chore: remove debug
sitepark-veltrup Apr 15, 2024
04b8639
test: fix tests
sitepark-veltrup Apr 15, 2024
dcd9343
refactor: use ResourceLocation and ResourceLanguage
sitepark-veltrup Apr 18, 2024
861e0ff
refactore: use ResourceLocation
sitepark-veltrup Apr 18, 2024
7d7b7fa
chore: composer update
sitepark-veltrup Apr 18, 2024
35529ba
feat: add AbsoluteDateRangeFilter filter
sitepark-veltrup Apr 22, 2024
05313ad
feat: Date range Filter
sitepark-veltrup Apr 26, 2024
d3eecb0
feat: add base date for relative date range filter
sitepark-veltrup Apr 26, 2024
e4afb03
refactore: rename for from and to to before and after
sitepark-veltrup Apr 26, 2024
f1799c3
fix: after date range was wrong
sitepark-veltrup Apr 26, 2024
dceacc7
style: fix codestyles
sitepark-veltrup Apr 26, 2024
eff2d80
Update src/Service/Indexer/IndexerProgressState.php
sitepark-veltrup Apr 29, 2024
766787a
Update src/Service/Indexer/IndexerProgressState.php
sitepark-veltrup Apr 29, 2024
7691a83
fix: add space in error message
sitepark-veltrup Apr 29, 2024
e2a0f29
fix: typo
sitepark-veltrup Apr 29, 2024
390c685
fix: sanitize file-system path
sitepark-veltrup Apr 29, 2024
b3a9b32
refactor: throw UnsupportedIndexLanguageException for unsupported lan…
sitepark-veltrup Apr 29, 2024
4b7cf32
fix: set the query-time to 0 if none can be determined
sitepark-veltrup Apr 29, 2024
2e2b71a
Apply suggestions from code review
sitepark-veltrup Apr 29, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
!var/cache/.gitkeep
/var/log/*
!var/log/.gitkeep
/var/test/*
/tools
.phpactor.json
composer.lock
10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
[![codecov](https://codecov.io/gh/sitepark/atoolo-resource/graph/badge.svg?token=QwvDRxKEa2)](https://codecov.io/gh/sitepark/atoolo-resource)
[![codecov](https://codecov.io/gh/sitepark/atoolo-search/graph/badge.svg?token=xBMwUzm34b)](https://codecov.io/gh/sitepark/atoolo-search)
![phpstan](https://img.shields.io/badge/PHPStan-level%209-brightgreen)
![php](https://img.shields.io/badge/PHP-8.1-blue)
![php](https://img.shields.io/badge/PHP-8.2-blue)
![php](https://img.shields.io/badge/PHP-8.3-blue)

# Atoolo search

Provides services with which a Solr index can be filled and searched for [resources](https://github.com/sitepark/atoolo-resource) via this index.
Provides services with which a Solr index can be filled and searched for [resources](https://github.com/sitepark/atoolo-resource) via a index.

[Documentation](https://sitepark.github.io/atoolo-docs/develop/components/search/)
20 changes: 20 additions & 0 deletions bin/console
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/usr/bin/env php
<?php
// application.php

require __DIR__.'/../vendor/autoload.php';

use Atoolo\Search\Console\Application;
use Symfony\Component\Config\FileLocator;

$container = new Symfony\Component\DependencyInjection\ContainerBuilder();
$loader = new Symfony\Component\DependencyInjection\Loader\YamlFileLoader(
$container,
new FileLocator(__DIR__ . '/../config'));

$loader->load('commands.yml');
$container->compile();

$application = $container->get(Application::class);

$application->run();
81 changes: 44 additions & 37 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,43 +3,61 @@
"description": "Indexing und searching",
"license": "MIT",
"type": "library",
"authors": [{
"name": "veltrup",
"email": "veltrup@sitepark.com"
}],
"autoload": {
"psr-4": {
"Atoolo\\Search\\": "src"
}
},
"autoload-dev": {
"psr-4": {
"Atoolo\\Search\\Test\\": "test"
"authors": [
{
"name": "veltrup",
"email": "veltrup@sitepark.com"
}
},
"minimum-stability": "dev",
"prefer-stable": true,
],
"require": {
"php": ">=8.1 <8.4.0",
"atoolo/resource": "dev-feature/hierarchy-loader",
"ext-intl": "*",
"atoolo/resource": "dev-main",
"solarium/solarium": "^6.3",
"symfony/config": "^6.3",
"symfony/console": "^6.3",
"symfony/dependency-injection": "^6.3",
"symfony/event-dispatcher": "^6.3",
"symfony/finder": "^6.3",
"symfony/yaml": "^6.3"
"symfony/config": "^6.3 || ^7.0",
"symfony/console": "^6.3 || ^7.0",
"symfony/dependency-injection": "^6.3 || ^7.0",
"symfony/event-dispatcher": "^6.3 || ^7.0",
"symfony/finder": "^6.3 || ^7.0",
"symfony/lock": "^6.3 || ^7.0",
"symfony/property-access": "^6.3 || ^7.0",
"symfony/serializer": "^6.3 || ^7.0",
"symfony/yaml": "^6.3 || ^7.0"
},
"require-dev": {
"dealerdirect/phpcodesniffer-composer-installer": "^1.0",
"infection/infection": "^0.27.6",
"phpcompatibility/php-compatibility": "^9.3",
"phpunit/phpunit": "^10.4",
"roave/security-advisories": "dev-latest",
"squizlabs/php_codesniffer": "^3.7"
"squizlabs/php_codesniffer": "^3.7",
"symfony/filesystem": "^6.3 || ^7.0"
},
"repositories": {},
"minimum-stability": "dev",
"prefer-stable": true,
"autoload": {
"psr-4": {
"Atoolo\\Search\\": "src"
}
},
"autoload-dev": {
"psr-4": {
"Atoolo\\Search\\Test\\": "test"
}
},
"config": {
"allow-plugins": {
"dealerdirect/phpcodesniffer-composer-installer": true,
"infection/extension-installer": true
},
"optimize-autoloader": true,
"preferred-install": {
"*": "dist"
},
"sort-packages": true
},
"scripts": {

"post-install-cmd": "phive --no-progress install --force-accept-unsigned --trust-gpg-keys C00543248C87FB13,4AA394086372C20A,CF1A108D0E7AE720,51C67305FFC2E5C0",
"analyse": [
"@analyse:phplint",
Expand All @@ -64,18 +82,7 @@
"test": [
"@test:phpunit"
],
"test:phpunit": "./tools/phpunit.phar -c phpunit.xml --coverage-text",
"test:infection": "vendor/bin/infection --threads=8 --no-progress --only-covered -s || exit 0"
},
"config": {
"allow-plugins": {
"dealerdirect/phpcodesniffer-composer-installer": true,
"infection/extension-installer": true
},
"optimize-autoloader": true,
"preferred-install": {
"*": "dist"
},
"sort-packages": true
"test:infection": "vendor/bin/infection --threads=8 --no-progress --only-covered -s || exit 0",
"test:phpunit": "./tools/phpunit.phar -c phpunit.xml --coverage-text"
}
}
50 changes: 50 additions & 0 deletions config/commands.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
services:
_defaults:
autowire: true
autoconfigure: true
_instanceof:
Symfony\Component\Console\Command\Command:
tags: ['command']

Atoolo\Search\Console\:
resource: '../src/Console'

atoolo.search.indexer.console.progressBar:
class: 'Atoolo\Search\Console\Command\Io\IndexerProgressBar'

Atoolo\Search\Console\Command\Indexer:
arguments:
- '@atoolo.resource.resourceChannelFactory'
- '@atoolo.search.indexer.console.progressBar'
- '@atoolo.search.indexer.indexerCollection'

Atoolo\Search\Console\Command\IndexerInternalResourceUpdate:
arguments:
- '@atoolo.resource.resourceChannelFactory'
- '@atoolo.search.indexer.console.progressBar'
- '@atoolo.search.indexer.internalResourceIndexer'

Atoolo\Search\Console\Command\Search:
arguments:
- '@atoolo.resource.resourceChannelFactory'
- '@atoolo.search.search'

Atoolo\Search\Console\Command\Suggest:
arguments:
- '@atoolo.resource.resourceChannelFactory'
- '@atoolo.search.suggest'

Atoolo\Search\Console\Command\MoreLikeThis:
arguments:
- '@atoolo.resource.resourceChannelFactory'
- '@atoolo.search.moreLikeThis'

Atoolo\Search\Console\Command\DumpIndexDocument:
arguments:
- '@atoolo.resource.resourceChannelFactory'
- '@atoolo.search.indexer.indexDocumentDumper'

Atoolo\Search\Console\Application:
public: true
arguments:
- !tagged command
9 changes: 7 additions & 2 deletions phpunit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,14 @@
bootstrap="vendor/autoload.php"
executionOrder="random"
cacheResultFile="var/cache/.phpunit.result.cache"
cacheDirectory="var/cache/.phpunit.cache">
cacheDirectory="var/cache/.phpunit.cache"
displayDetailsOnTestsThatTriggerDeprecations="true"
displayDetailsOnTestsThatTriggerErrors="true"
displayDetailsOnTestsThatTriggerNotices="true"
displayDetailsOnTestsThatTriggerWarnings="true">

<coverage>
<coverage
disableCodeCoverageIgnore="false">
<report>
<clover outputFile="var/log/clover/clover.xml"/>
<html outputDirectory="var/log/clover"/>
Expand Down
22 changes: 22 additions & 0 deletions src/Console/Application.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?php

declare(strict_types=1);

namespace Atoolo\Search\Console;

use Symfony\Component\Console\Application as BaseApplication;
use Symfony\Component\Console\Command\Command;

class Application extends BaseApplication
{
/**
* @param iterable<Command> $commands
*/
public function __construct(iterable $commands = [])
{
parent::__construct();
foreach ($commands as $command) {
$this->add($command);
}
}
}
70 changes: 70 additions & 0 deletions src/Console/Command/DumpIndexDocument.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
<?php

declare(strict_types=1);

namespace Atoolo\Search\Console\Command;

use Atoolo\Resource\ResourceChannelFactory;
use Atoolo\Search\Console\Command\Io\TypifiedInput;
use Atoolo\Search\Service\Indexer\IndexDocumentDumper;
use JsonException;
use Symfony\Component\Console\Attribute\AsCommand;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\Style\SymfonyStyle;

#[AsCommand(
name: 'search:dump-index-document',
description: 'Dump a index document'
)]
class DumpIndexDocument extends Command
{
public function __construct(
private readonly ResourceChannelFactory $channelFactory,
private readonly IndexDocumentDumper $dumper
) {
parent::__construct();
}

protected function configure(): void
{
$this
->setHelp('Command to dump a index-document')
->addArgument(
'paths',
InputArgument::REQUIRED | InputArgument::IS_ARRAY,
'Resources paths or directories of resources to be indexed.'
)
;
}

/**
* @throws JsonException
*/
protected function execute(
InputInterface $input,
OutputInterface $output
): int {

$typedInput = new TypifiedInput($input);

$paths = $typedInput->getArrayArgument('paths');

$resourceChannel = $this->channelFactory->create();
$io = new SymfonyStyle($input, $output);
$io->title('Channel: ' . $resourceChannel->name);

$dump = $this->dumper->dump($paths);

foreach ($dump as $fields) {
$output->writeln(json_encode(
$fields,
JSON_THROW_ON_ERROR | JSON_PRETTY_PRINT
));
}

return Command::SUCCESS;
}
}
Loading
Loading