diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index b9c47e8..9747228 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -12,7 +12,7 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v4 + uses: actions/checkout@v5 with: fetch-depth: 0 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f3635e7..03048aa 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,7 +13,7 @@ jobs: strategy: max-parallel: 10 matrix: - php: ['7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4', '8.5'] + php: ['8.2', '8.3', '8.4', '8.5'] steps: - name: Set up PHP @@ -23,14 +23,12 @@ jobs: coverage: none - name: Checkout code - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: Download dependencies run: | composer config minimum-stability dev - composer require "phpunit/phpunit=9.6.*" --dev --no-update - composer require "symfony/phpunit-bridge" --dev --no-update composer update --no-interaction --prefer-dist --optimize-autoloader --prefer-stable - name: Run tests - run: ./vendor/bin/simple-phpunit + run: ./vendor/bin/phpunit diff --git a/CHANGELOG.md b/CHANGELOG.md index 3d2915d..1288535 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,15 @@ ## NOT RELEASED +### Dependency bumped + +- Drop support for PHP versions lower than 8.2 + +### Changed + +- Apply new CodingStandard from latest php-cs-fixer. +- Add support for `async-aws` 3.0 in the testsuite + ## 1.15.0 ### Added diff --git a/README.md b/README.md index 865a0e7..6b3bce1 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # AsyncAws Symfony Bundle -![](https://github.com/async-aws/symfony-bundle/workflows/Tests/badge.svg?branch=master) -![](https://github.com/async-aws/symfony-bundle/workflows/BC%20Check/badge.svg?branch=master) +![CI](https://github.com/async-aws/symfony-bundle/actions/workflows/ci.yml/badge.svg?branch=master) +![BC Check](https://github.com/async-aws/symfony-bundle/actions/workflows/checks.yml/badge.svg?branch=master) A small SymfonyBundle that helps with configuration and autowiring. diff --git a/composer.json b/composer.json index f73222b..d264e98 100644 --- a/composer.json +++ b/composer.json @@ -12,20 +12,25 @@ "bundle" ], "require": { - "php": "^7.2.5 || ^8.0", + "php": "^8.2", "async-aws/core": "^1.0", "symfony/config": "^4.4 || ^5.0 || ^6.0 || ^7.0 || ^8.0", "symfony/dependency-injection": "^4.4 || ^5.0 || ^6.0 || ^7.0 || ^8.0", "symfony/http-kernel": "^4.4 || ^5.0 || ^6.0 || ^7.0 || ^8.0" }, "require-dev": { - "async-aws/s3": "^1.0 || ^2.0", + "async-aws/s3": "^1.0 || ^2.0 || ^3.0", "async-aws/ses": "^1.0", "async-aws/sqs": "^1.0 || ^2.0", "async-aws/ssm": "^1.0 || ^2.0", - "matthiasnoback/symfony-config-test": "^4.1 || ^5.0", + "matthiasnoback/symfony-config-test": "^6.1", "nyholm/symfony-bundle-test": "^3.0", - "symfony/cache": "^4.4 || ^5.0 || ^6.0 || ^7.0 || ^8.0" + "phpunit/phpunit": "^11.5.42", + "symfony/cache": "^4.4 || ^5.0 || ^6.0 || ^7.0 || ^8.0", + "symfony/error-handler": "^7.3.2 || ^8.0", + "symfony/framework-bundle": "^5.4.45 || ^6.4.13 || ^7.1.6", + "symfony/phpunit-bridge": "^7.3.2 || ^8.0", + "symfony/runtime": "^7.3.2 || ^8.0" }, "autoload": { "psr-4": { @@ -37,9 +42,14 @@ "AsyncAws\\Symfony\\Bundle\\Tests\\": "tests/" } }, + "config": { + "allow-plugins": { + "symfony/runtime": false + } + }, "extra": { "branch-alias": { - "dev-master": "1.15-dev" + "dev-master": "1.16-dev" } } } diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 9894ce3..20f6abf 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,17 +1,22 @@ - + ./src - + + trigger_deprecation + + @@ -20,4 +25,7 @@ ./tests/ + + + diff --git a/src/DependencyInjection/Configuration.php b/src/DependencyInjection/Configuration.php index 3a7e67e..baf963a 100644 --- a/src/DependencyInjection/Configuration.php +++ b/src/DependencyInjection/Configuration.php @@ -65,7 +65,7 @@ public function getConfigTreeBuilder(): TreeBuilder } /** - * @param null|array $clients + * @param array|null $clients * * @return array */ diff --git a/tests/Functional/BundleInitializationTest.php b/tests/Functional/BundleInitializationTest.php index 620dea6..0e9c0e0 100644 --- a/tests/Functional/BundleInitializationTest.php +++ b/tests/Functional/BundleInitializationTest.php @@ -186,9 +186,6 @@ public function testIssue1758Cache() $r = new \ReflectionObject($cache); $p = $r->getProperty('cache'); - if (\PHP_VERSION_ID < 80100) { - $p->setAccessible(true); - } $adapter = $p->getValue($cache); self::assertInstanceOf(ApcuAdapter::class, $adapter); @@ -207,9 +204,6 @@ public function testIssue1758Provider() $r = new \ReflectionClass(AbstractApi::class); $p = $r->getProperty('credentialProvider'); - if (\PHP_VERSION_ID < 80100) { - $p->setAccessible(true); - } $credentialProvider = $p->getValue($client); self::assertInstanceOf(InstanceProvider::class, $credentialProvider); @@ -230,9 +224,6 @@ public function testIssue1758ProviderAndCache() $r = new \ReflectionClass(AbstractApi::class); $p = $r->getProperty('credentialProvider'); - if (\PHP_VERSION_ID < 80100) { - $p->setAccessible(true); - } $credentialProvider = $p->getValue($client); self::assertInstanceOf(CacheProvider::class, $credentialProvider); @@ -241,17 +232,11 @@ public function testIssue1758ProviderAndCache() $r = new \ReflectionObject($cache); $p = $r->getProperty('cache'); - if (\PHP_VERSION_ID < 80100) { - $p->setAccessible(true); - } $adapter = $p->getValue($cache); self::assertInstanceOf(ApcuAdapter::class, $adapter); $p = $r->getProperty('decorated'); - if (\PHP_VERSION_ID < 80100) { - $p->setAccessible(true); - } $decorated = $p->getValue($cache); self::assertInstanceOf(InstanceProvider::class, $decorated); diff --git a/tests/Unit/Secrets/SsmVaultTest.php b/tests/Unit/Secrets/SsmVaultTest.php index f94d330..294c3d4 100644 --- a/tests/Unit/Secrets/SsmVaultTest.php +++ b/tests/Unit/Secrets/SsmVaultTest.php @@ -7,13 +7,12 @@ use AsyncAws\Ssm\SsmClient; use AsyncAws\Ssm\ValueObject\Parameter; use AsyncAws\Symfony\Bundle\Secrets\SsmVault; +use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\TestCase; class SsmVaultTest extends TestCase { - /** - * @dataProvider provideParameters - */ + #[DataProvider('provideParameters')] public function testLoadEnvVars($path, $parameterName, $expected) { $client = $this->createMock(SsmClient::class); @@ -28,7 +27,7 @@ public function testLoadEnvVars($path, $parameterName, $expected) self::assertEquals($expected, $actual); } - public function provideParameters(): iterable + public static function provideParameters(): iterable { yield 'simple' => [null, '/FOO', ['FOO' => 'value']]; yield 'case insensitive' => [null, '/fOo', ['FOO' => 'value']];