diff --git a/.github/workflows/test-application.yaml b/.github/workflows/test-application.yaml index efe6e8d6..1cdca36f 100644 --- a/.github/workflows/test-application.yaml +++ b/.github/workflows/test-application.yaml @@ -61,9 +61,17 @@ jobs: tools: 'composer:v2' php-cs-fixer: false - - php-version: '8.1' + - php-version: '8.2' elasticsearch-version: '7.11.1' elasticsearch-package-constraint: '~7.11.0' + minimum-stability: 'stable' + dependency-versions: 'highest' + tools: 'composer:v2' + php-cs-fixer: false + + - php-version: '8.3' + elasticsearch-version: '7.17.19' + elasticsearch-package-constraint: '~7.17.0' minimum-stability: 'dev' dependency-versions: 'highest' tools: 'composer:v2' diff --git a/Command/IndexRebuildCommand.php b/Command/IndexRebuildCommand.php index 84308d25..2fdc046f 100644 --- a/Command/IndexRebuildCommand.php +++ b/Command/IndexRebuildCommand.php @@ -29,7 +29,7 @@ public function configure() $this->setName(self::$defaultName); } - public function execute(InputInterface $input, OutputInterface $output) + public function execute(InputInterface $input, OutputInterface $output): int { $formatterHelper = new FormatterHelper(); $output->writeln( diff --git a/Command/InitCommand.php b/Command/InitCommand.php index 4c87ce64..477e1f87 100644 --- a/Command/InitCommand.php +++ b/Command/InitCommand.php @@ -18,6 +18,8 @@ /** * Initializes the search adapter. + * + * @final */ class InitCommand extends Command { @@ -41,7 +43,7 @@ public function configure() $this->setHelp('This command will simply call the initialize method of the currently active search adapter.'); } - protected function execute(InputInterface $input, OutputInterface $output) + protected function execute(InputInterface $input, OutputInterface $output): int { $this->adapter->initialize(); diff --git a/Command/OptimizeCommand.php b/Command/OptimizeCommand.php index a7ad63a5..dd5267bd 100644 --- a/Command/OptimizeCommand.php +++ b/Command/OptimizeCommand.php @@ -17,6 +17,9 @@ use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; +/** + * @final + */ class OptimizeCommand extends Command { protected static $defaultName = 'massive:search:optimize'; @@ -38,7 +41,7 @@ public function configure() $this->setDescription('Optimize all search indices. Affects only indices that are managed with the zend_lucene adapter at the moment.'); } - public function execute(InputInterface $input, OutputInterface $output) + public function execute(InputInterface $input, OutputInterface $output): int { if (!$this->adapter instanceof OptimizeableAdapterInterface) { $output->writeln(\sprintf('Adapter "%s" does not support index optimization.', \get_class($this->adapter))); diff --git a/Command/PurgeCommand.php b/Command/PurgeCommand.php index 3612a83c..6bf87a8b 100644 --- a/Command/PurgeCommand.php +++ b/Command/PurgeCommand.php @@ -21,6 +21,8 @@ /** * Command to purge search indexes. + * + * @final */ class PurgeCommand extends Command { @@ -65,7 +67,7 @@ public function configure() $this->addOption('force', null, InputOption::VALUE_NONE, 'Do not ask for confirmation.'); } - public function execute(InputInterface $input, OutputInterface $output) + public function execute(InputInterface $input, OutputInterface $output): int { $indexes = $input->getOption('index'); $all = $input->getOption('all'); diff --git a/Command/QueryCommand.php b/Command/QueryCommand.php index 3aee524a..0a494e6f 100644 --- a/Command/QueryCommand.php +++ b/Command/QueryCommand.php @@ -21,6 +21,8 @@ /** * Command to execute a query on the configured search engine. + * + * @final */ class QueryCommand extends Command { @@ -54,7 +56,7 @@ public function configure() ); } - public function execute(InputInterface $input, OutputInterface $output) + public function execute(InputInterface $input, OutputInterface $output): int { $query = $input->getArgument('query'); $indexes = $input->getOption('index'); diff --git a/Command/ReindexCommand.php b/Command/ReindexCommand.php index 77b0b0c0..8a521e26 100644 --- a/Command/ReindexCommand.php +++ b/Command/ReindexCommand.php @@ -29,6 +29,8 @@ /** * Command to build (or rebuild) the search index. + * + * @final */ class ReindexCommand extends Command { @@ -89,7 +91,7 @@ public function configure() $this->addOption('provider', null, InputOption::VALUE_REQUIRED | InputOption::VALUE_IS_ARRAY, 'Provider name'); } - public function execute(InputInterface $input, OutputInterface $output) + public function execute(InputInterface $input, OutputInterface $output): int { $formatterHelper = new FormatterHelper(); diff --git a/Command/StatusCommand.php b/Command/StatusCommand.php index 9fd7f3ec..0bc4cdea 100644 --- a/Command/StatusCommand.php +++ b/Command/StatusCommand.php @@ -21,6 +21,8 @@ /** * This command returns some vendor specific information about * the currently configured search implementation. + * + * @final */ class StatusCommand extends Command { @@ -48,7 +50,7 @@ public function configure() ); } - public function execute(InputInterface $input, OutputInterface $output) + public function execute(InputInterface $input, OutputInterface $output): int { $status = $this->searchManager->getStatus(); diff --git a/DependencyInjection/Configuration.php b/DependencyInjection/Configuration.php index 3ad58824..917ef555 100644 --- a/DependencyInjection/Configuration.php +++ b/DependencyInjection/Configuration.php @@ -18,10 +18,8 @@ class Configuration implements ConfigurationInterface { /** * Returns the config tree builder. - * - * @return TreeBuilder */ - public function getConfigTreeBuilder() + public function getConfigTreeBuilder(): TreeBuilder { $treeBuilder = new TreeBuilder('massive_search'); $treeBuilder->getRootNode() diff --git a/composer.json b/composer.json index 475d9ea1..0c92e503 100644 --- a/composer.json +++ b/composer.json @@ -10,30 +10,30 @@ ], "require": { "jms/metadata": "^2.6", - "symfony/config": "^4.3 || ^5.0 || ^6.0", - "symfony/console": "^4.3 || ^5.0 || ^6.0", - "symfony/event-dispatcher": "^4.3 || ^5.0 || ^6.0", - "symfony/expression-language": "^4.3 || ^5.0 || ^6.0", - "symfony/dependency-injection": "^4.3 || ^5.0 || ^6.0", - "symfony/property-access": "^4.3 || ^5.0 || ^6.0", + "symfony/config": "^4.3 || ^5.0 || ^6.0 || ^7.0", + "symfony/console": "^4.3 || ^5.0 || ^6.0 || ^7.0", + "symfony/event-dispatcher": "^4.3 || ^5.0 || ^6.0 || ^7.0", + "symfony/expression-language": "^4.3 || ^5.0 || ^6.0 || ^7.0", + "symfony/dependency-injection": "^4.3 || ^5.0 || ^6.0 || ^7.0", + "symfony/property-access": "^4.3 || ^5.0 || ^6.0 || ^7.0", "php": "^7.2 || ^8.0" }, "require-dev": { "handcraftedinthealps/zendsearch": "^2.0", "elasticsearch/elasticsearch": "^2.1 || ^5.0 || ^7.0", - "symfony-cmf/testing": "^3.0 || ^4.0@dev", - "symfony/filesystem": "^4.3.2 || ^5.0 || ^6.0", - "symfony/finder": "^4.3 || ^5.0 || ^6.0", - "symfony/http-kernel": "^4.3 || ^5.0 || ^6.0", - "symfony/framework-bundle": "^4.3 || ^5.0 || ^6.0", - "symfony/form": "^4.3 || ^5.0 || ^6.0", - "symfony/monolog-bridge": "^4.3 || ^5.0 || ^6.0", + "symfony-cmf/testing": "^3.0 || ^4.0 || ^5.0", + "symfony/filesystem": "^4.3.2 || ^5.0 || ^6.0 || ^7.0", + "symfony/finder": "^4.3 || ^5.0 || ^6.0 || ^7.0", + "symfony/http-kernel": "^4.3 || ^5.0 || ^6.0 || ^7.0", + "symfony/framework-bundle": "^4.3 || ^5.0 || ^6.0 || ^7.0", + "symfony/form": "^4.3 || ^5.0 || ^6.0 || ^7.0", + "symfony/monolog-bridge": "^4.3 || ^5.0 || ^6.0 || ^7.0", "symfony/monolog-bundle": "^3.1", - "symfony/security-bundle": "^4.3 || ^5.0 || ^6.0", - "symfony/twig-bundle": "^4.3 || ^5.0 || ^6.0", - "symfony/validator": "^4.3 || ^5.0 || ^6.0", - "symfony/phpunit-bridge": "^5.0.4 || ^6.0", - "matthiasnoback/symfony-dependency-injection-test": "^4.0", + "symfony/security-bundle": "^4.3 || ^5.0 || ^6.0 || ^7.0", + "symfony/twig-bundle": "^4.3 || ^5.0 || ^6.0 || ^7.0", + "symfony/validator": "^4.3 || ^5.0 || ^6.0 || ^7.0", + "symfony/phpunit-bridge": "^5.0.4 || ^6.0 || ^7.0", + "matthiasnoback/symfony-dependency-injection-test": "^4.0 || ^5.0", "doctrine/doctrine-bundle": "^1.10 || ^2.0", "doctrine/orm": "^2.5",