Skip to content

Commit 4ea3670

Browse files
Allow Symfony 7 versions of packages (#172)
* Allow Symfony 7 versions of packages * Add more PHP versions to test matrix * Fix compatibility to Symfony 7
1 parent 320ac89 commit 4ea3670

File tree

10 files changed

+48
-29
lines changed

10 files changed

+48
-29
lines changed

.github/workflows/test-application.yaml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,17 @@ jobs:
6767
php-cs-fixer: false
6868
max-phpunit-version: '8'
6969

70-
- php-version: '8.1'
70+
- php-version: '8.2'
7171
elasticsearch-version: '7.11.1'
7272
elasticsearch-package-constraint: '~7.11.0'
73+
minimum-stability: 'stable'
74+
dependency-versions: 'highest'
75+
tools: 'composer:v2'
76+
php-cs-fixer: false
77+
78+
- php-version: '8.3'
79+
elasticsearch-version: '7.17.19'
80+
elasticsearch-package-constraint: '~7.17.0'
7381
minimum-stability: 'dev'
7482
dependency-versions: 'highest'
7583
tools: 'composer:v2'

Command/IndexRebuildCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public function configure()
2929
$this->setName(self::$defaultName);
3030
}
3131

32-
public function execute(InputInterface $input, OutputInterface $output)
32+
public function execute(InputInterface $input, OutputInterface $output): int
3333
{
3434
$formatterHelper = new FormatterHelper();
3535
$output->writeln(

Command/InitCommand.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818

1919
/**
2020
* Initializes the search adapter.
21+
*
22+
* @final
2123
*/
2224
class InitCommand extends Command
2325
{
@@ -41,7 +43,7 @@ public function configure()
4143
$this->setHelp('This command will simply call the initialize method of the currently active search adapter.');
4244
}
4345

44-
protected function execute(InputInterface $input, OutputInterface $output)
46+
protected function execute(InputInterface $input, OutputInterface $output): int
4547
{
4648
$this->adapter->initialize();
4749

Command/OptimizeCommand.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@
1717
use Symfony\Component\Console\Input\InputInterface;
1818
use Symfony\Component\Console\Output\OutputInterface;
1919

20+
/**
21+
* @final
22+
*/
2023
class OptimizeCommand extends Command
2124
{
2225
protected static $defaultName = 'massive:search:optimize';
@@ -38,7 +41,7 @@ public function configure()
3841
$this->setDescription('Optimize all search indices. Affects only indices that are managed with the zend_lucene adapter at the moment.');
3942
}
4043

41-
public function execute(InputInterface $input, OutputInterface $output)
44+
public function execute(InputInterface $input, OutputInterface $output): int
4245
{
4346
if (!$this->adapter instanceof OptimizeableAdapterInterface) {
4447
$output->writeln(\sprintf('Adapter "%s" does not support index optimization.', \get_class($this->adapter)));

Command/PurgeCommand.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121

2222
/**
2323
* Command to purge search indexes.
24+
*
25+
* @final
2426
*/
2527
class PurgeCommand extends Command
2628
{
@@ -65,7 +67,7 @@ public function configure()
6567
$this->addOption('force', null, InputOption::VALUE_NONE, 'Do not ask for confirmation.');
6668
}
6769

68-
public function execute(InputInterface $input, OutputInterface $output)
70+
public function execute(InputInterface $input, OutputInterface $output): int
6971
{
7072
$indexes = $input->getOption('index');
7173
$all = $input->getOption('all');

Command/QueryCommand.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121

2222
/**
2323
* Command to execute a query on the configured search engine.
24+
*
25+
* @final
2426
*/
2527
class QueryCommand extends Command
2628
{
@@ -54,7 +56,7 @@ public function configure()
5456
);
5557
}
5658

57-
public function execute(InputInterface $input, OutputInterface $output)
59+
public function execute(InputInterface $input, OutputInterface $output): int
5860
{
5961
$query = $input->getArgument('query');
6062
$indexes = $input->getOption('index');

Command/ReindexCommand.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@
2929

3030
/**
3131
* Command to build (or rebuild) the search index.
32+
*
33+
* @final
3234
*/
3335
class ReindexCommand extends Command
3436
{
@@ -89,7 +91,7 @@ public function configure()
8991
$this->addOption('provider', null, InputOption::VALUE_REQUIRED | InputOption::VALUE_IS_ARRAY, 'Provider name');
9092
}
9193

92-
public function execute(InputInterface $input, OutputInterface $output)
94+
public function execute(InputInterface $input, OutputInterface $output): int
9395
{
9496
$formatterHelper = new FormatterHelper();
9597

Command/StatusCommand.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121
/**
2222
* This command returns some vendor specific information about
2323
* the currently configured search implementation.
24+
*
25+
* @final
2426
*/
2527
class StatusCommand extends Command
2628
{
@@ -48,7 +50,7 @@ public function configure()
4850
);
4951
}
5052

51-
public function execute(InputInterface $input, OutputInterface $output)
53+
public function execute(InputInterface $input, OutputInterface $output): int
5254
{
5355
$status = $this->searchManager->getStatus();
5456

DependencyInjection/Configuration.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,8 @@ class Configuration implements ConfigurationInterface
1818
{
1919
/**
2020
* Returns the config tree builder.
21-
*
22-
* @return TreeBuilder
2321
*/
24-
public function getConfigTreeBuilder()
22+
public function getConfigTreeBuilder(): TreeBuilder
2523
{
2624
$treeBuilder = new TreeBuilder('massive_search');
2725
$treeBuilder->getRootNode()

composer.json

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -10,30 +10,30 @@
1010
],
1111
"require": {
1212
"jms/metadata": "^2.6",
13-
"symfony/config": "^4.3 || ^5.0 || ^6.0",
14-
"symfony/console": "^4.3 || ^5.0 || ^6.0",
15-
"symfony/event-dispatcher": "^4.3 || ^5.0 || ^6.0",
16-
"symfony/expression-language": "^4.3 || ^5.0 || ^6.0",
17-
"symfony/dependency-injection": "^4.3 || ^5.0 || ^6.0",
18-
"symfony/property-access": "^4.3 || ^5.0 || ^6.0",
13+
"symfony/config": "^4.3 || ^5.0 || ^6.0 || ^7.0",
14+
"symfony/console": "^4.3 || ^5.0 || ^6.0 || ^7.0",
15+
"symfony/event-dispatcher": "^4.3 || ^5.0 || ^6.0 || ^7.0",
16+
"symfony/expression-language": "^4.3 || ^5.0 || ^6.0 || ^7.0",
17+
"symfony/dependency-injection": "^4.3 || ^5.0 || ^6.0 || ^7.0",
18+
"symfony/property-access": "^4.3 || ^5.0 || ^6.0 || ^7.0",
1919
"php": "^7.2 || ^8.0"
2020
},
2121
"require-dev": {
2222
"handcraftedinthealps/zendsearch": "^2.0",
2323
"elasticsearch/elasticsearch": "^2.1 || ^5.0 || ^7.0",
24-
"symfony-cmf/testing": "^3.0 || ^4.0@dev",
25-
"symfony/filesystem": "^4.3.2 || ^5.0 || ^6.0",
26-
"symfony/finder": "^4.3 || ^5.0 || ^6.0",
27-
"symfony/http-kernel": "^4.3 || ^5.0 || ^6.0",
28-
"symfony/framework-bundle": "^4.3 || ^5.0 || ^6.0",
29-
"symfony/form": "^4.3 || ^5.0 || ^6.0",
30-
"symfony/monolog-bridge": "^4.3 || ^5.0 || ^6.0",
24+
"symfony-cmf/testing": "^3.0 || ^4.0 || ^5.0",
25+
"symfony/filesystem": "^4.3.2 || ^5.0 || ^6.0 || ^7.0",
26+
"symfony/finder": "^4.3 || ^5.0 || ^6.0 || ^7.0",
27+
"symfony/http-kernel": "^4.3 || ^5.0 || ^6.0 || ^7.0",
28+
"symfony/framework-bundle": "^4.3 || ^5.0 || ^6.0 || ^7.0",
29+
"symfony/form": "^4.3 || ^5.0 || ^6.0 || ^7.0",
30+
"symfony/monolog-bridge": "^4.3 || ^5.0 || ^6.0 || ^7.0",
3131
"symfony/monolog-bundle": "^3.1",
32-
"symfony/security-bundle": "^4.3 || ^5.0 || ^6.0",
33-
"symfony/twig-bundle": "^4.3 || ^5.0 || ^6.0",
34-
"symfony/validator": "^4.3 || ^5.0 || ^6.0",
35-
"symfony/phpunit-bridge": "^5.0.4 || ^6.0",
36-
"matthiasnoback/symfony-dependency-injection-test": "^4.0",
32+
"symfony/security-bundle": "^4.3 || ^5.0 || ^6.0 || ^7.0",
33+
"symfony/twig-bundle": "^4.3 || ^5.0 || ^6.0 || ^7.0",
34+
"symfony/validator": "^4.3 || ^5.0 || ^6.0 || ^7.0",
35+
"symfony/phpunit-bridge": "^5.0.4 || ^6.0 || ^7.0",
36+
"matthiasnoback/symfony-dependency-injection-test": "^4.0 || ^5.0",
3737
"doctrine/doctrine-bundle": "^1.10 || ^2.0",
3838
"doctrine/orm": "^2.5",
3939

0 commit comments

Comments
 (0)