diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index 041c386..f827328 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -19,6 +19,7 @@ jobs: - "7.4" - "8.0" - "8.1" + - "8.2" deps: - "normal" symfony-require: @@ -56,6 +57,16 @@ jobs: php-version: "8.1" deps: "normal" + # Test against latest Symfony 5.4 stable on 8.2 + - symfony-require: "5.4.*" + php-version: "8.2" + deps: "dev" + + # Test against latest Symfony 5.4 stable on 8.2 deps normal + - symfony-require: "5.4.*" + php-version: "8.2" + deps: "normal" + # Test against latest Symfony 6.0 stable on 8.0 - symfony-require: "6.0.*" php-version: "8.0" @@ -76,6 +87,16 @@ jobs: php-version: "8.1" deps: "normal" + # Test against latest Symfony 6.0 stable on 8.2 + - symfony-require: "6.0.*" + php-version: "8.2" + deps: "dev" + + # Test against latest Symfony 6.0 stable on 8.2 deps normal + - symfony-require: "6.0.*" + php-version: "8.2" + deps: "normal" + # Test against latest Symfony 6.1 stable on 8.1 - symfony-require: "6.1.*" php-version: "8.1" @@ -86,6 +107,35 @@ jobs: php-version: "8.1" deps: "normal" + # Test against latest Symfony 6.1 stable on 8.2 + - symfony-require: "6.1.*" + php-version: "8.2" + deps: "dev" + + # Test against latest Symfony 6.1 stable on 8.2 deps normal + - symfony-require: "6.1.*" + php-version: "8.2" + deps: "normal" + + # Test against latest Symfony 6.2 stable on 8.1 + - symfony-require: "6.2.*" + php-version: "8.1" + deps: "dev" + + # Test against latest Symfony 6.2 stable on 8.1 deps normal + - symfony-require: "6.2.*" + php-version: "8.1" + deps: "normal" + + # Test against latest Symfony 6.2 stable on 8.2 + - symfony-require: "6.2.*" + php-version: "8.2" + deps: "dev" + + # Test against latest Symfony 6.2 stable on 8.2 deps normal + - symfony-require: "6.2.*" + php-version: "8.2" + deps: "normal" steps: - name: "Checkout" uses: "actions/checkout@v3" diff --git a/README.md b/README.md index 77706b3..d6ca286 100755 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ [![PHP](https://img.shields.io/badge/php->=7.3,%20>=7.4,%20>=8.0-8892BF.svg)](https://packagist.org/packages/php-tmdb/api) [![Total Downloads](https://poser.pugx.org/php-tmdb/symfony/downloads.svg)](https://packagist.org/packages/php-tmdb/symfony) -Compatible with Symfony 4 and 5, PHP 7.3 and up. +Compatible with Symfony 5 and 6, PHP 7.4 and up. ## Buy me a coffee, or a beer :-) diff --git a/Tests/DependencyInjection/CompilerPass/ConfigurationPassTest.php b/Tests/DependencyInjection/CompilerPass/ConfigurationPassTest.php index f523a0e..207d00a 100644 --- a/Tests/DependencyInjection/CompilerPass/ConfigurationPassTest.php +++ b/Tests/DependencyInjection/CompilerPass/ConfigurationPassTest.php @@ -81,12 +81,12 @@ public function testAutowiring() $pass = new ConfigurationPass(); $pass->process($container); - $this->assertAlias($container, get_class($eventDispatcherMock), EventDispatcherInterface::class); - $this->assertAlias($container, get_class($httpClientMock), ClientInterface::class); - $this->assertAlias($container, get_class($requestFactoryMock), RequestFactoryInterface::class); - $this->assertAlias($container, get_class($responseFactoryMock), ResponseFactoryInterface::class); - $this->assertAlias($container, get_class($streamFactoryMock), StreamFactoryInterface::class); - $this->assertAlias($container, get_class($uriFactoryMock), UriFactoryInterface::class); + $this->assertTag($container, get_class($eventDispatcherMock), TmdbSymfonyBundle::PSR14_EVENT_DISPATCHERS); + $this->assertTag($container, get_class($httpClientMock), TmdbSymfonyBundle::PSR18_CLIENTS); + $this->assertTag($container, get_class($requestFactoryMock), TmdbSymfonyBundle::PSR17_REQUEST_FACTORIES); + $this->assertTag($container, get_class($responseFactoryMock), TmdbSymfonyBundle::PSR17_RESPONSE_FACTORIES); + $this->assertTag($container, get_class($streamFactoryMock), TmdbSymfonyBundle::PSR17_STREAM_FACTORIES); + $this->assertTag($container, get_class($uriFactoryMock), TmdbSymfonyBundle::PSR17_URI_FACTORIES); } /** diff --git a/Tests/DependencyInjection/TestCase.php b/Tests/DependencyInjection/TestCase.php index d093b2a..394e001 100644 --- a/Tests/DependencyInjection/TestCase.php +++ b/Tests/DependencyInjection/TestCase.php @@ -30,6 +30,16 @@ protected function assertAlias(ContainerBuilder $container, $value, $key): void $this->assertSame($value, (string)$container->getAlias($key), sprintf('%s alias is correct', $key)); } + /** + * @param ContainerBuilder $container + * @param string $class + * @param string $tag + */ + protected function assertTag(ContainerBuilder $container, string $class, string $tag): void + { + $this->assertArrayHasKey($class, $container->findTaggedServiceIds($tag)); + } + /** * @param string $key */ diff --git a/composer.json b/composer.json index 15e506e..0ee83bb 100755 --- a/composer.json +++ b/composer.json @@ -47,7 +47,8 @@ }, "config": { "allow-plugins": { - "dealerdirect/phpcodesniffer-composer-installer": true + "dealerdirect/phpcodesniffer-composer-installer": true, + "php-http/discovery": true } } }