diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e30c0b45..92d1074f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -62,7 +62,7 @@ jobs: fail-fast: false matrix: php: [ '8.0', '8.1', '8.2', '8.3', '8.4', '8.5' ] - sf_version: [ '6.4.*', '7.3.*', '7.4.*' ] + sf_version: [ '6.4.*', '7.3.*', '7.4.*', '8.0.*' ] exclude: - php: '8.0' sf_version: '6.4.*' @@ -70,6 +70,14 @@ jobs: sf_version: '7.3.*' - php: '8.1' sf_version: '7.3.*' + - php: '8.0' + sf_version: '8.0.*' + - php: '8.1' + sf_version: '8.0.*' + - php: '8.2' + sf_version: '8.0.*' + - php: '8.3' + sf_version: '8.0.*' - php: '8.0' sf_version: '7.4.*' - php: '8.1' diff --git a/composer.json b/composer.json index 58348813..52464466 100644 --- a/composer.json +++ b/composer.json @@ -17,9 +17,9 @@ "php": "^8.1", "geocoder-php/plugin": "^1.5", "php-http/discovery": "^1.14", - "symfony/console": "^5.4 || ^6.4 || ^7.0", - "symfony/framework-bundle": "^5.4 || ^6.4 || ^7.0", - "symfony/options-resolver": "^5.4 || ^6.4 || ^7.0", + "symfony/console": "^5.4 || ^6.4 || ^7.0 || ^8.0", + "symfony/framework-bundle": "^5.4 || ^6.4 || ^7.0 || ^8.0", + "symfony/options-resolver": "^5.4 || ^6.4 || ^7.0 || ^8.0", "willdurand/geocoder": "^4.6|^5.0" }, "require-dev": { @@ -60,13 +60,13 @@ "phpstan/phpstan": "^1.9.2", "psr/http-client": "^1.0", "psr/simple-cache": "^1.0 || ^2.0", - "symfony/cache": "^5.4 || ^6.4 || ^7.0", - "symfony/config": "^5.4 || ^6.4 || ^7.0", - "symfony/http-client": "^5.4 || ^6.4 || ^7.0", - "symfony/phpunit-bridge": "^5.4 || ^6.4 || ^7.0", - "symfony/validator": "^5.4 || ^6.4 || ^7.0", - "symfony/var-exporter": "^5.4 || ^6.4 || ^7.0", - "symfony/yaml": "^5.4 || ^6.4 || ^7.0" + "symfony/cache": "^5.4 || ^6.4 || ^7.0 || ^8.0", + "symfony/config": "^5.4 || ^6.4 || ^7.0 || ^8.0", + "symfony/http-client": "^5.4 || ^6.4 || ^7.0 || ^8.0", + "symfony/phpunit-bridge": "^5.4 || ^6.4 || ^7.0 || ^8.0", + "symfony/validator": "^5.4 || ^6.4 || ^7.0 || ^8.0", + "symfony/var-exporter": "^5.4 || ^6.4 || ^7.0 || ^8.0", + "symfony/yaml": "^5.4 || ^6.4 || ^7.0 || ^8.0" }, "autoload": { "psr-4": { diff --git a/src/Command/GeocodeCommand.php b/src/Command/GeocodeCommand.php index d17afa70..5e5b3dcf 100644 --- a/src/Command/GeocodeCommand.php +++ b/src/Command/GeocodeCommand.php @@ -36,10 +36,7 @@ public function __construct(ProviderAggregator $geocoder) parent::__construct(); } - /** - * @return void - */ - protected function configure() + protected function configure(): void { $this ->addArgument('address', InputArgument::REQUIRED, 'The address') diff --git a/src/Validator/Constraint/AddressValidator.php b/src/Validator/Constraint/AddressValidator.php index a01ff13a..f0126d9f 100644 --- a/src/Validator/Constraint/AddressValidator.php +++ b/src/Validator/Constraint/AddressValidator.php @@ -37,10 +37,8 @@ public function __construct(Provider $addressGeocoder) /** * @param mixed $value - * - * @return void */ - public function validate($value, Constraint $constraint) + public function validate($value, Constraint $constraint): void { if (!$constraint instanceof Address) { throw new UnexpectedTypeException($constraint, Address::class); diff --git a/tests/Functional/BundleInitializationTest.php b/tests/Functional/BundleInitializationTest.php index 705b303e..74d427ea 100644 --- a/tests/Functional/BundleInitializationTest.php +++ b/tests/Functional/BundleInitializationTest.php @@ -54,7 +54,7 @@ public function testInitBundle(): void $kernel->addTestConfig(__DIR__.'/config/framework.yml'); if ($kernel::VERSION_ID >= 60000) { - $kernel->addTestConfig(__DIR__.'/config/framework_sf6.yml'); + $kernel->addTestConfig(__DIR__.'/config/framework_sf'.$kernel::MAJOR_VERSION.'.yml'); } }]); @@ -72,7 +72,7 @@ public function testBundleWithOneProviderConfiguration(): void $kernel->addTestConfig(__DIR__.'/config/framework.yml'); if ($kernel::VERSION_ID >= 60000) { - $kernel->addTestConfig(__DIR__.'/config/framework_sf6.yml'); + $kernel->addTestConfig(__DIR__.'/config/framework_sf'.$kernel::MAJOR_VERSION.'.yml'); } $kernel->addTestConfig(__DIR__.'/config/simple.yml'); @@ -92,7 +92,7 @@ public function testBundleWithCachedProvider(): void $kernel->addTestConfig(__DIR__.'/config/framework.yml'); if ($kernel::VERSION_ID >= 60000) { - $kernel->addTestConfig(__DIR__.'/config/framework_sf6.yml'); + $kernel->addTestConfig(__DIR__.'/config/framework_sf'.$kernel::MAJOR_VERSION.'.yml'); } $kernel->addTestConfig(__DIR__.'/config/cache.yml'); @@ -114,7 +114,7 @@ public function testCacheLifetimeCanBeNull(): void $kernel->addTestConfig(__DIR__.'/config/framework.yml'); if ($kernel::VERSION_ID >= 60000) { - $kernel->addTestConfig(__DIR__.'/config/framework_sf6.yml'); + $kernel->addTestConfig(__DIR__.'/config/framework_sf'.$kernel::MAJOR_VERSION.'.yml'); } $kernel->addTestConfig(__DIR__.'/config/cache_without_lifetime.yml'); @@ -144,7 +144,7 @@ public function testBundleWithPluginsYml(): void $kernel->addTestConfig(__DIR__.'/config/framework.yml'); if ($kernel::VERSION_ID >= 60000) { - $kernel->addTestConfig(__DIR__.'/config/framework_sf6.yml'); + $kernel->addTestConfig(__DIR__.'/config/framework_sf'.$kernel::MAJOR_VERSION.'.yml'); } $kernel->addTestConfig(__DIR__.'/config/service_plugin.yml'); @@ -166,7 +166,7 @@ public function testBundleHasRegisteredDumpers(): void $kernel->addTestConfig(__DIR__.'/config/framework.yml'); if ($kernel::VERSION_ID >= 60000) { - $kernel->addTestConfig(__DIR__.'/config/framework_sf6.yml'); + $kernel->addTestConfig(__DIR__.'/config/framework_sf'.$kernel::MAJOR_VERSION.'.yml'); } }]); diff --git a/tests/Functional/GeocoderListenerTest.php b/tests/Functional/GeocoderListenerTest.php index e7c16cc0..acc8293a 100644 --- a/tests/Functional/GeocoderListenerTest.php +++ b/tests/Functional/GeocoderListenerTest.php @@ -108,7 +108,7 @@ public function testPersistForProperty(): void $kernel->addTestConfig(__DIR__.'/config/framework.yml'); if ($kernel::VERSION_ID >= 60000) { - $kernel->addTestConfig(__DIR__.'/config/framework_sf6.yml'); + $kernel->addTestConfig(__DIR__.'/config/framework_sf'.$kernel::MAJOR_VERSION.'.yml'); } $kernel->addTestConfig(__DIR__.'/config/listener.yml'); @@ -148,7 +148,7 @@ public function testPersistForGetter(): void $kernel->addTestConfig(__DIR__.'/config/framework.yml'); if ($kernel::VERSION_ID >= 60000) { - $kernel->addTestConfig(__DIR__.'/config/framework_sf6.yml'); + $kernel->addTestConfig(__DIR__.'/config/framework_sf'.$kernel::MAJOR_VERSION.'.yml'); } $kernel->addTestConfig(__DIR__.'/config/listener.yml'); @@ -188,7 +188,7 @@ public function testPersistForStringableGetter(): void $kernel->addTestConfig(__DIR__.'/config/framework.yml'); if ($kernel::VERSION_ID >= 60000) { - $kernel->addTestConfig(__DIR__.'/config/framework_sf6.yml'); + $kernel->addTestConfig(__DIR__.'/config/framework_sf'.$kernel::MAJOR_VERSION.'.yml'); } $kernel->addTestConfig(__DIR__.'/config/listener.yml'); @@ -228,7 +228,7 @@ public function testPersistForInvalidGetter(): void $kernel->addTestConfig(__DIR__.'/config/framework.yml'); if ($kernel::VERSION_ID >= 60000) { - $kernel->addTestConfig(__DIR__.'/config/framework_sf6.yml'); + $kernel->addTestConfig(__DIR__.'/config/framework_sf'.$kernel::MAJOR_VERSION.'.yml'); } $kernel->addTestConfig(__DIR__.'/config/listener.yml'); @@ -261,7 +261,7 @@ public function testPersistForEmptyProperty(): void $kernel->addTestConfig(__DIR__.'/config/framework.yml'); if ($kernel::VERSION_ID >= 60000) { - $kernel->addTestConfig(__DIR__.'/config/framework_sf6.yml'); + $kernel->addTestConfig(__DIR__.'/config/framework_sf'.$kernel::MAJOR_VERSION.'.yml'); } $kernel->addTestConfig(__DIR__.'/config/listener.yml'); @@ -294,7 +294,7 @@ public function testDoesNotGeocodeIfAddressNotChanged(): void $kernel->addTestConfig(__DIR__.'/config/framework.yml'); if ($kernel::VERSION_ID >= 60000) { - $kernel->addTestConfig(__DIR__.'/config/framework_sf6.yml'); + $kernel->addTestConfig(__DIR__.'/config/framework_sf'.$kernel::MAJOR_VERSION.'.yml'); } $kernel->addTestConfig(__DIR__.'/config/listener.yml'); diff --git a/tests/Functional/PluginInteractionTest.php b/tests/Functional/PluginInteractionTest.php index 2a15b6bf..27a33815 100644 --- a/tests/Functional/PluginInteractionTest.php +++ b/tests/Functional/PluginInteractionTest.php @@ -59,7 +59,7 @@ public function testCachePluginUsesIpFromFakeIpPlugin(): void $kernel->addTestConfig(__DIR__.'/config/framework.yml'); if ($kernel::VERSION_ID >= 60000) { - $kernel->addTestConfig(__DIR__.'/config/framework_sf6.yml'); + $kernel->addTestConfig(__DIR__.'/config/framework_sf'.$kernel::MAJOR_VERSION.'.yml'); } $kernel->addTestConfig(__DIR__.'/config/cache_symfony.yml'); @@ -85,7 +85,7 @@ public function testCachePluginUsesIpFromFakeIpPlugin(): void $kernel->addTestConfig(__DIR__.'/config/framework.yml'); if ($kernel::VERSION_ID >= 60000) { - $kernel->addTestConfig(__DIR__.'/config/framework_sf6.yml'); + $kernel->addTestConfig(__DIR__.'/config/framework_sf'.$kernel::MAJOR_VERSION.'.yml'); } $kernel->addTestConfig(__DIR__.'/config/cache_symfony.yml'); diff --git a/tests/Functional/ProviderFactoryTest.php b/tests/Functional/ProviderFactoryTest.php index 64489d66..ee1af4e5 100644 --- a/tests/Functional/ProviderFactoryTest.php +++ b/tests/Functional/ProviderFactoryTest.php @@ -78,7 +78,7 @@ public function testProviderConfiguration(string $class, array $serviceNames): v $kernel->addTestConfig(__DIR__.'/config/framework.yml'); if ($kernel::VERSION_ID >= 60000) { - $kernel->addTestConfig(__DIR__.'/config/framework_sf6.yml'); + $kernel->addTestConfig(__DIR__.'/config/framework_sf'.$kernel::MAJOR_VERSION.'.yml'); } $kernel->addTestConfig(__DIR__.'/config/provider/'.strtolower(substr($class, strrpos($class, '\\') + 1)).'.yml'); diff --git a/tests/Functional/config/framework_sf7.yml b/tests/Functional/config/framework_sf7.yml new file mode 100644 index 00000000..25f5a5b0 --- /dev/null +++ b/tests/Functional/config/framework_sf7.yml @@ -0,0 +1,5 @@ +framework: + annotations: false + handle_all_throwables: true + php_errors: + log: true diff --git a/tests/Functional/config/framework_sf8.yml b/tests/Functional/config/framework_sf8.yml new file mode 100644 index 00000000..17ad5131 --- /dev/null +++ b/tests/Functional/config/framework_sf8.yml @@ -0,0 +1,4 @@ +framework: + handle_all_throwables: true + php_errors: + log: true