diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9ce925b26..277addefd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -58,7 +58,6 @@ jobs: sed -i -re 's/"require": \{/"repositories": [{"type": "path","url": "..\/..\/Core", "options": {"versions": {"async-aws\/core": "dev-master"}}, "canonical": ${{matrix.strategy != 'lowest' && 'true' || 'false'}} }],"require": \{/' composer.json composer config minimum-stability dev composer config prefer-stable true - composer require --dev --no-update symfony/phpunit-bridge:^7.3.2 cat composer.json echo ::endgroup:: @@ -71,7 +70,6 @@ jobs: echo "$CURRENT_DIR/$COMPONENT" cd "$CURRENT_DIR/$COMPONENT" - sed -i -re 's/"require": \{/"conflict": \{"phpunit\/phpunit": ">=10.0"\},"require": \{/' composer.json composer config minimum-stability dev composer config prefer-stable true cat composer.json @@ -93,9 +91,7 @@ jobs: cd "$CURRENT_DIR/$COMPONENT" localExit=0 - composer require symfony/phpunit-bridge:^7.3.2@dev --dev --no-update --no-install composer update --no-interaction --no-scripts --prefer-dist --optimize-autoloader ${{ matrix.strategy == 'lowest' && '--prefer-lowest' || '' }} $COMPOSER_OPTIONS || localExit=1 - ./vendor/bin/simple-phpunit install echo ::endgroup:: if [ $localExit -ne 0 ]; then echo "::error::$COMPONENT error" @@ -105,19 +101,16 @@ jobs: - name: Run tests env: - OVERRIDE_SYMFONY_DEPRECATIONS_HELPER: ${{ matrix.strategy == 'lowest' && 'max[self]=9999' || '' }} + PHPUNIT_FLAGS: ${{ matrix.strategy == 'lowest' && '--do-not-fail-on-deprecation' || '' }} run: | ok=0 - if [ -n "$OVERRIDE_SYMFONY_DEPRECATIONS_HELPER" ]; then - export SYMFONY_DEPRECATIONS_HELPER=$OVERRIDE_SYMFONY_DEPRECATIONS_HELPER - fi CURRENT_DIR=$(pwd) for COMPONENT in $(find src -maxdepth 4 -type f -name phpunit.xml.dist -printf '%h\n' | sort) do echo ::group::$COMPONENT localExit=0 cd "$CURRENT_DIR/$COMPONENT" - ./vendor/bin/simple-phpunit 2>&1 || localExit=1 + ./vendor/bin/phpunit $PHPUNIT_FLAGS 2>&1 || localExit=1 ok=$(( $localExit || $ok )) echo ::endgroup:: if [ $localExit -ne 0 ]; then @@ -163,12 +156,7 @@ jobs: - name: Download dependencies run: | composer config minimum-stability ${{ matrix.minimum_stability }} - composer require --dev --no-update "phpunit/phpunit=9.6.*" composer update --no-interaction --prefer-dist --optimize-autoloader - name: Run tests - run: | - echo ::group::Install - ./vendor/bin/simple-phpunit install - echo ::endgroup:: - ./vendor/bin/simple-phpunit + run: ./vendor/bin/phpunit diff --git a/.github/workflows/static.yml b/.github/workflows/static.yml index 256ef46f3..1b15dea42 100644 --- a/.github/workflows/static.yml +++ b/.github/workflows/static.yml @@ -40,9 +40,7 @@ jobs: restore-keys: phpstan- - name: Download dependencies - run: | - composer update --no-interaction --prefer-dist --optimize-autoloader - ./vendor/bin/simple-phpunit install + run: composer update --no-interaction --prefer-dist --optimize-autoloader - name: PHPStan run: vendor/bin/phpstan analyze --no-progress @@ -104,9 +102,7 @@ jobs: restore-keys: composer- - name: Download dependencies - run: | - composer update --no-interaction --prefer-dist --optimize-autoloader - ./vendor/bin/simple-phpunit install + run: composer update --no-interaction --prefer-dist --optimize-autoloader - name: Psalm run: vendor/bin/psalm.phar --no-progress --show-info=false --stats diff --git a/Makefile b/Makefile index 576020c14..994b5e668 100644 --- a/Makefile +++ b/Makefile @@ -39,7 +39,7 @@ stop-docker: docker rm async_aws_kms || true test: initialize - ./vendor/bin/simple-phpunit + ./vendor/bin/phpunit website-assets: website/template/assets/app.css website/template/assets/app.css: website/node_modules website/assets/* diff --git a/composer.json b/composer.json index f94430a08..5b4ba6ea7 100644 --- a/composer.json +++ b/composer.json @@ -21,13 +21,13 @@ "illuminate/cache": "^6.18.13 || ^7.10 || ^8.0 || ^9.0 || ^10.0 || ^11.0", "illuminate/queue": "^6.18.11 || ^7.10 || ^8.0 || ^9.0 || ^10.0 || ^11.0", "illuminate/support": "^6.18.13 || ^7.10 || ^8.0 || ^9.0 || ^10.0 || ^11.0", - "matthiasnoback/symfony-config-test": "^4.1 || ^5.0", + "matthiasnoback/symfony-config-test": "^6.1", "monolog/monolog": "^1.1 || ^2.0 || ^3.0", "nette/php-generator": "^3.6 || ^4.1", "nette/utils": "^3.0 || ^4.0", - "nikic/php-parser": "^4.0", "nyholm/symfony-bundle-test": "^3.0", "phpstan/phpstan": "~2.0.0", + "phpunit/phpunit": "^11.5.42", "psalm/phar": "~6.13.1", "psr/cache": "^1.0 || ^2.0 || ^3.0", "swaggest/json-diff": "^3.7", @@ -36,14 +36,16 @@ "symfony/console": "^4.4 || ^5.0 || ^6.0 || ^7.0 || ^8.0", "symfony/dependency-injection": "^4.4 || ^5.0 || ^6.0 || ^7.0 || ^8.0", "symfony/deprecation-contracts": "^2.1 || ^3.0", + "symfony/error-handler": "^7.3.2 || ^8.0", "symfony/filesystem": "^5.0 || ^6.0 || ^7.0 || ^8.0", "symfony/finder": "^4.4 || ^5.0 || ^6.0 || ^7.0 || ^8.0", + "symfony/framework-bundle": "^5.4.45 || ^6.4.13 || ^7.1.6", "symfony/http-kernel": "^4.4 || ^5.0 || ^6.0 || ^7.0 || ^8.0", - "symfony/phpunit-bridge": "^5.3 || ^6.0 || ^7.0 || ^8.0", - "symfony/polyfill-uuid": "^1.13.1" + "symfony/phpunit-bridge": "^7.3.2 || ^8.0", + "symfony/polyfill-uuid": "^1.13.1", + "symfony/runtime": "^7.3.2 || ^8.0" }, "conflict": { - "phpunit/phpunit": ">=10", "symfony/http-client": "5.2.0" }, "autoload": { @@ -156,7 +158,8 @@ }, "config": { "allow-plugins": { - "ergebnis/composer-normalize": true + "ergebnis/composer-normalize": true, + "symfony/runtime": false } } } diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 2a147efe3..385256247 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,17 +1,32 @@ + + + ./src + + + ./src/Core/tests/ + ./src/Service/*/tests/ + ./src/Integration/*/tests/ + ./src/Integration/*/*/tests/ + + + trigger_deprecation + + - diff --git a/psalm.xml b/psalm.xml index a68956e00..9d0571957 100644 --- a/psalm.xml +++ b/psalm.xml @@ -22,10 +22,6 @@ - - - - diff --git a/src/CodeGenerator/.github/workflows/ci.yml b/src/CodeGenerator/.github/workflows/ci.yml index 46fb5be9e..03048aaff 100644 --- a/src/CodeGenerator/.github/workflows/ci.yml +++ b/src/CodeGenerator/.github/workflows/ci.yml @@ -28,8 +28,7 @@ jobs: - name: Download dependencies run: | composer config minimum-stability dev - composer req symfony/phpunit-bridge --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/src/CodeGenerator/composer.json b/src/CodeGenerator/composer.json index a698d25e5..a07b60ec0 100644 --- a/src/CodeGenerator/composer.json +++ b/src/CodeGenerator/composer.json @@ -19,6 +19,11 @@ "symfony/process": "^4.4 || ^5.0 || ^6.0 || ^7.0 || ^8.0", "symfony/service-contracts": "^2.0 || ^3.0" }, + "require-dev": { + "phpunit/phpunit": "^11.5.42", + "symfony/error-handler": "^7.3.2 || ^8.0", + "symfony/phpunit-bridge": "^7.3.2 || ^8.0" + }, "autoload": { "psr-4": { "AsyncAws\\CodeGenerator\\": "src" diff --git a/src/Core/.github/workflows/ci.yml b/src/Core/.github/workflows/ci.yml index f8cd96e76..fd44f8c70 100644 --- a/src/Core/.github/workflows/ci.yml +++ b/src/Core/.github/workflows/ci.yml @@ -31,8 +31,7 @@ jobs: - name: Download dependencies run: | composer config minimum-stability dev - composer req symfony/phpunit-bridge --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/src/Core/Makefile b/src/Core/Makefile index 290d8323c..419b8543d 100644 --- a/src/Core/Makefile +++ b/src/Core/Makefile @@ -14,7 +14,7 @@ start-docker-s3: docker run -d -p 4569:4569 -p 4570:4569 --name async_aws_s3 asyncaws/testing-s3 test: initialize - ./vendor/bin/simple-phpunit + ./vendor/bin/phpunit clean: stop-docker stop-docker: diff --git a/src/Core/composer.json b/src/Core/composer.json index 84afb4373..17ba46b53 100644 --- a/src/Core/composer.json +++ b/src/Core/composer.json @@ -22,6 +22,11 @@ "symfony/http-client-contracts": "^1.1.8 || ^2.0 || ^3.0", "symfony/service-contracts": "^1.0 || ^2.0 || ^3.0" }, + "require-dev": { + "phpunit/phpunit": "^11.5.42", + "symfony/error-handler": "^7.3.2 || ^8.0", + "symfony/phpunit-bridge": "^7.3.2 || ^8.0" + }, "conflict": { "async-aws/s3": "<1.1", "symfony/http-client": "5.2.0" diff --git a/src/Core/phpunit.xml.dist b/src/Core/phpunit.xml.dist index 3185bb954..20f6abf4c 100644 --- a/src/Core/phpunit.xml.dist +++ b/src/Core/phpunit.xml.dist @@ -1,5 +1,22 @@ - + + + + ./src + + + trigger_deprecation + + @@ -8,9 +25,7 @@ ./tests/ - - - ./src - - + + + diff --git a/src/Core/tests/HttpClient/AwsRetryStrategyTest.php b/src/Core/tests/HttpClient/AwsRetryStrategyTest.php index a242b2330..3d49707b0 100644 --- a/src/Core/tests/HttpClient/AwsRetryStrategyTest.php +++ b/src/Core/tests/HttpClient/AwsRetryStrategyTest.php @@ -4,6 +4,7 @@ use AsyncAws\Core\HttpClient\AwsRetryStrategy; use AsyncAws\Core\Test\TestCase; +use PHPUnit\Framework\Attributes\DataProvider; use Symfony\Component\HttpClient\MockHttpClient; use Symfony\Component\HttpClient\Response\AsyncContext; use Symfony\Component\HttpClient\Response\MockResponse; @@ -11,10 +12,8 @@ class AwsRetryStrategyTest extends TestCase { - /** - * @dataProvider provideRetries - */ - public function testShoudRetry(?bool $expected, int $statusCode, ?string $response): void + #[DataProvider('provideRetries')] + public function testShouldRetry(?bool $expected, int $statusCode, ?string $response): void { if (!class_exists(GenericRetryStrategy::class)) { self::markTestSkipped('AwsRetryStrategy requires symfony/http-client 5.2'); @@ -25,7 +24,7 @@ public function testShoudRetry(?bool $expected, int $statusCode, ?string $respon self::assertSame($expected, $strategy->shouldRetry($context, $response, null)); } - public function provideRetries(): iterable + public static function provideRetries(): iterable { yield [false, 200, null]; yield [true, 429, null]; diff --git a/src/Core/tests/Unit/ConfigurationTest.php b/src/Core/tests/Unit/ConfigurationTest.php index e076a82b4..19be96e8b 100644 --- a/src/Core/tests/Unit/ConfigurationTest.php +++ b/src/Core/tests/Unit/ConfigurationTest.php @@ -5,13 +5,12 @@ namespace AsyncAws\Core\Tests\Unit; use AsyncAws\Core\Configuration; +use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\TestCase; class ConfigurationTest extends TestCase { - /** - * @dataProvider provideConfiguration - */ + #[DataProvider('provideConfiguration')] public function testCreate($config, $env, $expected) { foreach ($env as $key => $value) { @@ -61,7 +60,7 @@ public function testIsDefaultWhenPassingNull() self::assertNull($config->get('accessKeySecret')); } - public function provideConfiguration(): iterable + public static function provideConfiguration(): iterable { yield 'simple config' => [['endpoint' => 'foo'], [], ['endpoint' => 'foo']]; yield 'empty config' => [['endpoint' => ''], [], ['endpoint' => '']]; diff --git a/src/Core/tests/Unit/Signer/SignerV4Test.php b/src/Core/tests/Unit/Signer/SignerV4Test.php index 18acb9353..13427969a 100644 --- a/src/Core/tests/Unit/Signer/SignerV4Test.php +++ b/src/Core/tests/Unit/Signer/SignerV4Test.php @@ -9,6 +9,7 @@ use AsyncAws\Core\RequestContext; use AsyncAws\Core\Signer\SignerV4; use AsyncAws\Core\Stream\StringStream; +use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\TestCase; class SignerV4Test extends TestCase @@ -60,9 +61,7 @@ public function testPresign() self::assertEqualsCanonicalizing($expectedQuery, $request->getQuery()); } - /** - * @dataProvider provideRequests - */ + #[DataProvider('provideRequests')] public function testSignsRequests($rawRequest, $rawExpected) { $request = $this->parseRequest($rawRequest); @@ -140,9 +139,7 @@ public static function provideRequests() ]; } - /** - * @dataProvider provideRequestsWithQueryParams - */ + #[DataProvider('provideRequestsWithQueryParams')] public function testSignsRequestsWithArrayInQueryParams($rawRequestWithoutQuery, $rawExpected, $queryParams) { $request = $this->parseRequest($rawRequestWithoutQuery, $queryParams); diff --git a/src/Core/tests/Unit/Stream/CallableStreamTest.php b/src/Core/tests/Unit/Stream/CallableStreamTest.php index fb14d53aa..9d84a6812 100644 --- a/src/Core/tests/Unit/Stream/CallableStreamTest.php +++ b/src/Core/tests/Unit/Stream/CallableStreamTest.php @@ -5,13 +5,12 @@ namespace AsyncAws\Core\Tests\Unit\Stream; use AsyncAws\Core\Stream\CallableStream; +use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\TestCase; class CallableStreamTest extends TestCase { - /** - * @dataProvider provideLengths - */ + #[DataProvider('provideLengths')] public function testLength(callable $content, ?int $expected): void { $stream = CallableStream::create($content); @@ -19,9 +18,7 @@ public function testLength(callable $content, ?int $expected): void self::assertSame($expected, $stream->length()); } - /** - * @dataProvider provideStrings - */ + #[DataProvider('provideStrings')] public function testStringify(callable $content, string $expected): void { $stream = CallableStream::create($content); @@ -29,9 +26,7 @@ public function testStringify(callable $content, string $expected): void self::assertSame($expected, $stream->stringify()); } - /** - * @dataProvider provideChunks - */ + #[DataProvider('provideChunks')] public function testChunk(callable $content, array $expected): void { $stream = CallableStream::create($content); @@ -39,14 +34,14 @@ public function testChunk(callable $content, array $expected): void self::assertSame($expected, iterator_to_array($stream)); } - public function provideLengths(): iterable + public static function provideLengths(): iterable { yield [function () { return 'Hello world'; }, null]; } - public function provideStrings(): iterable + public static function provideStrings(): iterable { $f = static function (string ...$items) { return static function () use (&$items) { @@ -58,7 +53,7 @@ public function provideStrings(): iterable yield [$f('Hello', ' ', '', 'world'), 'Hello ']; } - public function provideChunks(): iterable + public static function provideChunks(): iterable { $f = static function (string ...$items) { return static function () use (&$items) { diff --git a/src/Core/tests/Unit/Stream/FixedSizeStreamTest.php b/src/Core/tests/Unit/Stream/FixedSizeStreamTest.php index 85a585a4b..6eec10e81 100644 --- a/src/Core/tests/Unit/Stream/FixedSizeStreamTest.php +++ b/src/Core/tests/Unit/Stream/FixedSizeStreamTest.php @@ -9,13 +9,12 @@ use AsyncAws\Core\Stream\IterableStream; use AsyncAws\Core\Stream\RequestStream; use AsyncAws\Core\Stream\StringStream; +use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\TestCase; class FixedSizeStreamTest extends TestCase { - /** - * @dataProvider provideLengths - */ + #[DataProvider('provideLengths')] public function testLength(RequestStream $content, ?int $expected): void { $stream = FixedSizeStream::create($content); @@ -23,9 +22,7 @@ public function testLength(RequestStream $content, ?int $expected): void self::assertSame($expected, $stream->length()); } - /** - * @dataProvider provideStrings - */ + #[DataProvider('provideStrings')] public function testStringify(RequestStream $content, string $expected): void { $stream = FixedSizeStream::create($content); @@ -33,9 +30,7 @@ public function testStringify(RequestStream $content, string $expected): void self::assertSame($expected, $stream->stringify()); } - /** - * @dataProvider provideChunks - */ + #[DataProvider('provideChunks')] public function testChunk(RequestStream $content, int $size, array $expected): void { $stream = FixedSizeStream::create($content, $size); @@ -43,9 +38,7 @@ public function testChunk(RequestStream $content, int $size, array $expected): v self::assertSame($expected, iterator_to_array($stream)); } - /** - * @dataProvider provideChunks - */ + #[DataProvider('provideChunks')] public function testDecoratingFixedSize(RequestStream $content, int $size, array $expected): void { $stream = FixedSizeStream::create(FixedSizeStream::create($content, 5), $size); @@ -53,19 +46,19 @@ public function testDecoratingFixedSize(RequestStream $content, int $size, array self::assertSame($expected, iterator_to_array($stream)); } - public function provideLengths(): iterable + public static function provideLengths(): iterable { yield [StringStream::create('Hello world'), 11]; yield [CallableStream::create(function () {}), null]; } - public function provideStrings(): iterable + public static function provideStrings(): iterable { yield [StringStream::create('Hello world'), 'Hello world']; yield [IterableStream::create((function () { yield 'Hello world'; })()), 'Hello world']; } - public function provideChunks(): iterable + public static function provideChunks(): iterable { yield [StringStream::create('Hello world'), 3, ['Hel', 'lo ', 'wor', 'ld']]; yield [IterableStream::create((function () { diff --git a/src/Core/tests/Unit/Stream/IterableStreamTest.php b/src/Core/tests/Unit/Stream/IterableStreamTest.php index 72dc3cdd5..c4c46bcc5 100644 --- a/src/Core/tests/Unit/Stream/IterableStreamTest.php +++ b/src/Core/tests/Unit/Stream/IterableStreamTest.php @@ -5,13 +5,12 @@ namespace AsyncAws\Core\Tests\Unit\Stream; use AsyncAws\Core\Stream\IterableStream; +use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\TestCase; class IterableStreamTest extends TestCase { - /** - * @dataProvider provideLengths - */ + #[DataProvider('provideLengths')] public function testLength(iterable $content, ?int $expected): void { $stream = IterableStream::create($content); @@ -19,9 +18,7 @@ public function testLength(iterable $content, ?int $expected): void self::assertSame($expected, $stream->length()); } - /** - * @dataProvider provideStrings - */ + #[DataProvider('provideStrings')] public function testStringify(iterable $content, string $expected): void { $stream = IterableStream::create($content); @@ -29,9 +26,7 @@ public function testStringify(iterable $content, string $expected): void self::assertSame($expected, $stream->stringify()); } - /** - * @dataProvider provideChunks - */ + #[DataProvider('provideChunks')] public function testChunk(iterable $content, array $expected): void { $stream = IterableStream::create($content); @@ -39,14 +34,14 @@ public function testChunk(iterable $content, array $expected): void self::assertSame($expected, iterator_to_array($stream)); } - public function provideLengths(): iterable + public static function provideLengths(): iterable { yield [(function () { yield 'Hello world'; })(), null]; } - public function provideStrings(): iterable + public static function provideStrings(): iterable { yield [(function () { yield 'Hello world'; @@ -65,7 +60,7 @@ public function provideStrings(): iterable })(), 'Hello world']; } - public function provideChunks(): iterable + public static function provideChunks(): iterable { yield [(function () { yield 'Hello world'; diff --git a/src/Core/tests/Unit/Stream/ResourceStreamTest.php b/src/Core/tests/Unit/Stream/ResourceStreamTest.php index 86d5ddf0d..3737b9eed 100644 --- a/src/Core/tests/Unit/Stream/ResourceStreamTest.php +++ b/src/Core/tests/Unit/Stream/ResourceStreamTest.php @@ -5,13 +5,12 @@ namespace AsyncAws\Core\Tests\Unit\Stream; use AsyncAws\Core\Stream\ResourceStream; +use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\TestCase; class ResourceStreamTest extends TestCase { - /** - * @dataProvider provideLengths - */ + #[DataProvider('provideLengths')] public function testLength($content, ?int $expected): void { $stream = ResourceStream::create($content); @@ -19,9 +18,7 @@ public function testLength($content, ?int $expected): void self::assertSame($expected, $stream->length()); } - /** - * @dataProvider provideStrings - */ + #[DataProvider('provideStrings')] public function testStringify($content, string $expected): void { $stream = ResourceStream::create($content); @@ -29,16 +26,14 @@ public function testStringify($content, string $expected): void self::assertSame($expected, $stream->stringify()); } - /** - * @dataProvider provideChunks - */ + #[DataProvider('provideChunks')] public function testChunk($content, int $size, array $expected): void { $stream = ResourceStream::create($content, $size); self::assertSame($expected, iterator_to_array($stream)); } - public function provideLengths(): iterable + public static function provideLengths(): iterable { $resource = fopen(__DIR__ . '/../../../LICENSE', 'r'); yield [$resource, 1099]; @@ -53,7 +48,7 @@ public function provideLengths(): iterable yield [$resource, 11]; } - public function provideStrings(): iterable + public static function provideStrings(): iterable { $resource = fopen('php://temp', 'rw+'); fwrite($resource, 'Hello World'); @@ -65,7 +60,7 @@ public function provideStrings(): iterable yield [$resource, 'Hello World']; } - public function provideChunks(): iterable + public static function provideChunks(): iterable { $resource = fopen('php://temp', 'rw+'); fwrite($resource, 'Hello World'); diff --git a/src/Core/tests/Unit/Stream/RewindableStreamTest.php b/src/Core/tests/Unit/Stream/RewindableStreamTest.php index fca7aacab..0997db4e7 100644 --- a/src/Core/tests/Unit/Stream/RewindableStreamTest.php +++ b/src/Core/tests/Unit/Stream/RewindableStreamTest.php @@ -9,13 +9,12 @@ use AsyncAws\Core\Stream\RequestStream; use AsyncAws\Core\Stream\RewindableStream; use AsyncAws\Core\Stream\StringStream; +use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\TestCase; class RewindableStreamTest extends TestCase { - /** - * @dataProvider provideLengths - */ + #[DataProvider('provideLengths')] public function testLength(RequestStream $content, ?int $expected): void { $stream = RewindableStream::create($content); @@ -23,9 +22,7 @@ public function testLength(RequestStream $content, ?int $expected): void self::assertSame($expected, $stream->length()); } - /** - * @dataProvider provideStrings - */ + #[DataProvider('provideStrings')] public function testStringify(RequestStream $content, string $expected): void { $stream = RewindableStream::create($content); @@ -33,9 +30,7 @@ public function testStringify(RequestStream $content, string $expected): void self::assertSame($expected, $stream->stringify()); } - /** - * @dataProvider provideChunks - */ + #[DataProvider('provideChunks')] public function testChunk(RequestStream $content, array $expected): void { $stream = RewindableStream::create($content); @@ -46,7 +41,7 @@ public function testChunk(RequestStream $content, array $expected): void /** * Asserts the streams returns always the same value, but calls the closure once. */ - public function testNoRewind(): void + public static function testNoRewind(): void { $count = 0; $stream = RewindableStream::create(CallableStream::create(function () use (&$count) { @@ -60,19 +55,19 @@ public function testNoRewind(): void self::assertSame(2, $count); } - public function provideLengths(): iterable + public static function provideLengths(): iterable { yield [StringStream::create('Hello world'), 11]; yield [CallableStream::create(function () {}), null]; } - public function provideStrings(): iterable + public static function provideStrings(): iterable { yield [StringStream::create('Hello world'), 'Hello world']; yield [IterableStream::create((function () { yield 'Hello world'; })()), 'Hello world']; } - public function provideChunks(): iterable + public static function provideChunks(): iterable { yield [StringStream::create('Hello world'), ['Hello world']]; } diff --git a/src/Core/tests/Unit/Stream/StringStreamTest.php b/src/Core/tests/Unit/Stream/StringStreamTest.php index 2455bebd5..ffd4bd67e 100644 --- a/src/Core/tests/Unit/Stream/StringStreamTest.php +++ b/src/Core/tests/Unit/Stream/StringStreamTest.php @@ -5,13 +5,12 @@ namespace AsyncAws\Core\Tests\Unit\Stream; use AsyncAws\Core\Stream\StringStream; +use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\TestCase; class StringStreamTest extends TestCase { - /** - * @dataProvider provideLengths - */ + #[DataProvider('provideLengths')] public function testLength(string $content, ?int $expected): void { $stream = StringStream::create($content); @@ -19,9 +18,7 @@ public function testLength(string $content, ?int $expected): void self::assertSame($expected, $stream->length()); } - /** - * @dataProvider provideStrings - */ + #[DataProvider('provideStrings')] public function testStringify(string $content, string $expected): void { $stream = StringStream::create($content); @@ -29,9 +26,7 @@ public function testStringify(string $content, string $expected): void self::assertSame($expected, $stream->stringify()); } - /** - * @dataProvider provideChunks - */ + #[DataProvider('provideChunks')] public function testChunk(string $content, array $expected): void { $stream = StringStream::create($content); @@ -39,19 +34,19 @@ public function testChunk(string $content, array $expected): void self::assertSame($expected, iterator_to_array($stream)); } - public function provideLengths(): iterable + public static function provideLengths(): iterable { yield ['Hello world', 11]; yield ['H', 1]; yield ['é', 2]; } - public function provideStrings(): iterable + public static function provideStrings(): iterable { yield ['Hello world', 'Hello world']; } - public function provideChunks(): iterable + public static function provideChunks(): iterable { yield ['Hello world', ['Hello world']]; } diff --git a/src/Integration/Aws/DynamoDbSession/.github/workflows/ci.yml b/src/Integration/Aws/DynamoDbSession/.github/workflows/ci.yml index 46fb5be9e..03048aaff 100644 --- a/src/Integration/Aws/DynamoDbSession/.github/workflows/ci.yml +++ b/src/Integration/Aws/DynamoDbSession/.github/workflows/ci.yml @@ -28,8 +28,7 @@ jobs: - name: Download dependencies run: | composer config minimum-stability dev - composer req symfony/phpunit-bridge --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/src/Integration/Aws/DynamoDbSession/composer.json b/src/Integration/Aws/DynamoDbSession/composer.json index 69540baba..2da4df18a 100644 --- a/src/Integration/Aws/DynamoDbSession/composer.json +++ b/src/Integration/Aws/DynamoDbSession/composer.json @@ -15,6 +15,11 @@ "php": "^8.2", "async-aws/dynamo-db": "^1.0 || ^2.0 || ^3.0" }, + "require-dev": { + "phpunit/phpunit": "^11.5.42", + "symfony/error-handler": "^7.3.2 || ^8.0", + "symfony/phpunit-bridge": "^7.3.2 || ^8.0" + }, "autoload": { "psr-4": { "AsyncAws\\DynamoDbSession\\": "src" diff --git a/src/Integration/Aws/DynamoDbSession/phpunit.xml.dist b/src/Integration/Aws/DynamoDbSession/phpunit.xml.dist index 9894ce353..20f6abf4c 100644 --- a/src/Integration/Aws/DynamoDbSession/phpunit.xml.dist +++ b/src/Integration/Aws/DynamoDbSession/phpunit.xml.dist @@ -1,17 +1,22 @@ - + ./src - + + trigger_deprecation + + @@ -20,4 +25,7 @@ ./tests/ + + + diff --git a/src/Integration/Aws/DynamoDbSession/tests/SessionHandlerTest.php b/src/Integration/Aws/DynamoDbSession/tests/SessionHandlerTest.php index b7f8ee53c..29ec9586b 100644 --- a/src/Integration/Aws/DynamoDbSession/tests/SessionHandlerTest.php +++ b/src/Integration/Aws/DynamoDbSession/tests/SessionHandlerTest.php @@ -181,35 +181,42 @@ public function testWriteTwice() ->willReturn(ResultMockFactory::create(GetItemOutput::class, [ 'Item' => [ 'data' => new AttributeValue(['S' => 'previous data']), - 'expires' => new AttributeValue(['N' => time() + 86400]), + 'expires' => new AttributeValue(['N' => (string) (time() + 86400)]), ], ])); + $expectedFirstData = [ + 'TableName' => 'testTable', + 'Key' => [ + 'id' => ['S' => 'PHPSESSID_123456789'], + ], + 'AttributeUpdates' => [ + 'expires' => ['Value' => ['N' => (string) (time() + 86400)]], + 'data' => ['Value' => ['S' => 'new data']], + ], + ]; + $expectedSecondData = [ + 'TableName' => 'testTable', + 'Key' => [ + 'id' => ['S' => 'PHPSESSID_123456789'], + ], + 'AttributeUpdates' => [ + 'expires' => ['Value' => ['N' => (string) (time() + 86400)]], + 'data' => ['Value' => ['S' => 'previous data']], + ], + ]; + $this->client ->expects(self::exactly(2)) ->method('updateItem') - ->withConsecutive( - [self::equalTo([ - 'TableName' => 'testTable', - 'Key' => [ - 'id' => ['S' => 'PHPSESSID_123456789'], - ], - 'AttributeUpdates' => [ - 'expires' => ['Value' => ['N' => time() + 86400]], - 'data' => ['Value' => ['S' => 'new data']], - ], - ], 10)], - [self::equalTo([ - 'TableName' => 'testTable', - 'Key' => [ - 'id' => ['S' => 'PHPSESSID_123456789'], - ], - 'AttributeUpdates' => [ - 'expires' => ['Value' => ['N' => time() + 86400]], - 'data' => ['Value' => ['S' => 'previous data']], - ], - ], 10)] - ); + ->with(self::callback(function (array $data) use ($expectedFirstData, $expectedSecondData): bool { + static $i = 0; + + return match (++$i) { + 1 => $data === $expectedFirstData, + 2 => $data === $expectedSecondData, + }; + })); $this->handler->read('123456789'); $this->handler->write('123456789', 'new data'); diff --git a/src/Integration/Aws/SimpleS3/.github/workflows/ci.yml b/src/Integration/Aws/SimpleS3/.github/workflows/ci.yml index 46fb5be9e..03048aaff 100644 --- a/src/Integration/Aws/SimpleS3/.github/workflows/ci.yml +++ b/src/Integration/Aws/SimpleS3/.github/workflows/ci.yml @@ -28,8 +28,7 @@ jobs: - name: Download dependencies run: | composer config minimum-stability dev - composer req symfony/phpunit-bridge --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/src/Integration/Aws/SimpleS3/composer.json b/src/Integration/Aws/SimpleS3/composer.json index ee9344fe9..7f05ec5e3 100644 --- a/src/Integration/Aws/SimpleS3/composer.json +++ b/src/Integration/Aws/SimpleS3/composer.json @@ -15,6 +15,11 @@ "ext-json": "*", "async-aws/s3": "^3.0" }, + "require-dev": { + "phpunit/phpunit": "^11.5.42", + "symfony/error-handler": "^7.3.2 || ^8.0", + "symfony/phpunit-bridge": "^7.3.2 || ^8.0" + }, "autoload": { "psr-4": { "AsyncAws\\SimpleS3\\": "src" diff --git a/src/Integration/Aws/SimpleS3/phpunit.xml.dist b/src/Integration/Aws/SimpleS3/phpunit.xml.dist index 9894ce353..20f6abf4c 100644 --- a/src/Integration/Aws/SimpleS3/phpunit.xml.dist +++ b/src/Integration/Aws/SimpleS3/phpunit.xml.dist @@ -1,17 +1,22 @@ - + ./src - + + trigger_deprecation + + @@ -20,4 +25,7 @@ ./tests/ + + + diff --git a/src/Integration/Laravel/Cache/.github/workflows/ci.yml b/src/Integration/Laravel/Cache/.github/workflows/ci.yml index 46fb5be9e..03048aaff 100644 --- a/src/Integration/Laravel/Cache/.github/workflows/ci.yml +++ b/src/Integration/Laravel/Cache/.github/workflows/ci.yml @@ -28,8 +28,7 @@ jobs: - name: Download dependencies run: | composer config minimum-stability dev - composer req symfony/phpunit-bridge --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/src/Integration/Laravel/Cache/composer.json b/src/Integration/Laravel/Cache/composer.json index 9bee84fd5..ad98aa5d0 100644 --- a/src/Integration/Laravel/Cache/composer.json +++ b/src/Integration/Laravel/Cache/composer.json @@ -16,6 +16,11 @@ "illuminate/cache": "^6.18.13 || ^7.10 || ^8.0 || ^9.0 || ^10.0 || ^11.0", "illuminate/support": "^6.18.13 || ^7.10 || ^8.0 || ^9.0 || ^10.0 || ^11.0" }, + "require-dev": { + "phpunit/phpunit": "^11.5.42", + "symfony/error-handler": "^7.3.2 || ^8.0", + "symfony/phpunit-bridge": "^7.3.2 || ^8.0" + }, "autoload": { "psr-4": { "AsyncAws\\Illuminate\\Cache\\": "src" diff --git a/src/Integration/Laravel/Cache/phpunit.xml.dist b/src/Integration/Laravel/Cache/phpunit.xml.dist index 9894ce353..20f6abf4c 100644 --- a/src/Integration/Laravel/Cache/phpunit.xml.dist +++ b/src/Integration/Laravel/Cache/phpunit.xml.dist @@ -1,17 +1,22 @@ - + ./src - + + trigger_deprecation + + @@ -20,4 +25,7 @@ ./tests/ + + + diff --git a/src/Integration/Laravel/Queue/.github/workflows/ci.yml b/src/Integration/Laravel/Queue/.github/workflows/ci.yml index 46fb5be9e..03048aaff 100644 --- a/src/Integration/Laravel/Queue/.github/workflows/ci.yml +++ b/src/Integration/Laravel/Queue/.github/workflows/ci.yml @@ -28,8 +28,7 @@ jobs: - name: Download dependencies run: | composer config minimum-stability dev - composer req symfony/phpunit-bridge --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/src/Integration/Laravel/Queue/composer.json b/src/Integration/Laravel/Queue/composer.json index afb5c4a75..3231f7179 100644 --- a/src/Integration/Laravel/Queue/composer.json +++ b/src/Integration/Laravel/Queue/composer.json @@ -17,6 +17,11 @@ "illuminate/queue": "^6.18.11 || ^7.10 || ^8.0 || ^9.0 || ^10.0 || ^11.0", "illuminate/support": "^6.18.13 || ^7.10 || ^8.0 || ^9.0 || ^10.0 || ^11.0" }, + "require-dev": { + "phpunit/phpunit": "^11.5.42", + "symfony/error-handler": "^7.3.2 || ^8.0", + "symfony/phpunit-bridge": "^7.3.2 || ^8.0" + }, "autoload": { "psr-4": { "AsyncAws\\Illuminate\\Queue\\": "src" diff --git a/src/Integration/Laravel/Queue/phpunit.xml.dist b/src/Integration/Laravel/Queue/phpunit.xml.dist index 9894ce353..a2777b875 100644 --- a/src/Integration/Laravel/Queue/phpunit.xml.dist +++ b/src/Integration/Laravel/Queue/phpunit.xml.dist @@ -1,17 +1,22 @@ - + ./src - + + trigger_deprecation + + @@ -20,4 +25,7 @@ ./tests/ + + + diff --git a/src/Integration/Monolog/CloudWatch/.github/workflows/ci.yml b/src/Integration/Monolog/CloudWatch/.github/workflows/ci.yml index 46fb5be9e..03048aaff 100644 --- a/src/Integration/Monolog/CloudWatch/.github/workflows/ci.yml +++ b/src/Integration/Monolog/CloudWatch/.github/workflows/ci.yml @@ -28,8 +28,7 @@ jobs: - name: Download dependencies run: | composer config minimum-stability dev - composer req symfony/phpunit-bridge --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/src/Integration/Monolog/CloudWatch/composer.json b/src/Integration/Monolog/CloudWatch/composer.json index b68521fd8..8b63603fb 100644 --- a/src/Integration/Monolog/CloudWatch/composer.json +++ b/src/Integration/Monolog/CloudWatch/composer.json @@ -15,6 +15,11 @@ "async-aws/cloud-watch-logs": "^1.0 || ^2.0", "monolog/monolog": "^1.1 || ^2.0 || ^3.0" }, + "require-dev": { + "phpunit/phpunit": "^11.5.42", + "symfony/error-handler": "^7.3.2 || ^8.0", + "symfony/phpunit-bridge": "^7.3.2 || ^8.0" + }, "autoload": { "psr-4": { "AsyncAws\\Monolog\\CloudWatch\\": "src" diff --git a/src/Integration/Monolog/CloudWatch/phpunit.xml.dist b/src/Integration/Monolog/CloudWatch/phpunit.xml.dist index 9894ce353..20f6abf4c 100644 --- a/src/Integration/Monolog/CloudWatch/phpunit.xml.dist +++ b/src/Integration/Monolog/CloudWatch/phpunit.xml.dist @@ -1,17 +1,22 @@ - + ./src - + + trigger_deprecation + + @@ -20,4 +25,7 @@ ./tests/ + + + diff --git a/src/Integration/Symfony/Bundle/.github/workflows/ci.yml b/src/Integration/Symfony/Bundle/.github/workflows/ci.yml index f8a251d5f..03048aaff 100644 --- a/src/Integration/Symfony/Bundle/.github/workflows/ci.yml +++ b/src/Integration/Symfony/Bundle/.github/workflows/ci.yml @@ -28,9 +28,7 @@ jobs: - 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/src/Integration/Symfony/Bundle/composer.json b/src/Integration/Symfony/Bundle/composer.json index ed60e53ce..d264e9800 100644 --- a/src/Integration/Symfony/Bundle/composer.json +++ b/src/Integration/Symfony/Bundle/composer.json @@ -23,9 +23,14 @@ "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,6 +42,11 @@ "AsyncAws\\Symfony\\Bundle\\Tests\\": "tests/" } }, + "config": { + "allow-plugins": { + "symfony/runtime": false + } + }, "extra": { "branch-alias": { "dev-master": "1.16-dev" diff --git a/src/Integration/Symfony/Bundle/phpunit.xml.dist b/src/Integration/Symfony/Bundle/phpunit.xml.dist index 9894ce353..20f6abf4c 100644 --- a/src/Integration/Symfony/Bundle/phpunit.xml.dist +++ b/src/Integration/Symfony/Bundle/phpunit.xml.dist @@ -1,17 +1,22 @@ - + ./src - + + trigger_deprecation + + @@ -20,4 +25,7 @@ ./tests/ + + + diff --git a/src/Integration/Symfony/Bundle/tests/Unit/Secrets/SsmVaultTest.php b/src/Integration/Symfony/Bundle/tests/Unit/Secrets/SsmVaultTest.php index f94d330ad..294c3d433 100644 --- a/src/Integration/Symfony/Bundle/tests/Unit/Secrets/SsmVaultTest.php +++ b/src/Integration/Symfony/Bundle/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']]; diff --git a/src/Service/.template/.github/workflows/ci.yml b/src/Service/.template/.github/workflows/ci.yml index f8cd96e76..fd44f8c70 100644 --- a/src/Service/.template/.github/workflows/ci.yml +++ b/src/Service/.template/.github/workflows/ci.yml @@ -31,8 +31,7 @@ jobs: - name: Download dependencies run: | composer config minimum-stability dev - composer req symfony/phpunit-bridge --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/src/Service/.template/Makefile b/src/Service/.template/Makefile index 850dffccd..771133a06 100644 --- a/src/Service/.template/Makefile +++ b/src/Service/.template/Makefile @@ -5,7 +5,7 @@ start-docker: echo "Noop" test: initialize - ./vendor/bin/simple-phpunit + ./vendor/bin/phpunit clean: stop-docker stop-docker: diff --git a/src/Service/.template/composer.json b/src/Service/.template/composer.json index 7461db2e2..9947b6d47 100644 --- a/src/Service/.template/composer.json +++ b/src/Service/.template/composer.json @@ -13,6 +13,11 @@ "require": { "php": "^8.2" }, + "require-dev": { + "phpunit/phpunit": "^11.5.42", + "symfony/error-handler": "^7.3.2 || ^8.0", + "symfony/phpunit-bridge": "^7.3.2 || ^8.0" + }, "autoload": { "psr-4": { "AsyncAws\\Foobar\\": "src" diff --git a/src/Service/.template/phpunit.xml.dist b/src/Service/.template/phpunit.xml.dist index 9894ce353..20f6abf4c 100644 --- a/src/Service/.template/phpunit.xml.dist +++ b/src/Service/.template/phpunit.xml.dist @@ -1,17 +1,22 @@ - + ./src - + + trigger_deprecation + + @@ -20,4 +25,7 @@ ./tests/ + + + diff --git a/src/Service/AppSync/.github/workflows/ci.yml b/src/Service/AppSync/.github/workflows/ci.yml index f8cd96e76..fd44f8c70 100644 --- a/src/Service/AppSync/.github/workflows/ci.yml +++ b/src/Service/AppSync/.github/workflows/ci.yml @@ -31,8 +31,7 @@ jobs: - name: Download dependencies run: | composer config minimum-stability dev - composer req symfony/phpunit-bridge --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/src/Service/AppSync/Makefile b/src/Service/AppSync/Makefile index 850dffccd..771133a06 100644 --- a/src/Service/AppSync/Makefile +++ b/src/Service/AppSync/Makefile @@ -5,7 +5,7 @@ start-docker: echo "Noop" test: initialize - ./vendor/bin/simple-phpunit + ./vendor/bin/phpunit clean: stop-docker stop-docker: diff --git a/src/Service/AppSync/composer.json b/src/Service/AppSync/composer.json index fb8c34b34..771c7ac38 100644 --- a/src/Service/AppSync/composer.json +++ b/src/Service/AppSync/composer.json @@ -16,6 +16,11 @@ "ext-json": "*", "async-aws/core": "^1.9" }, + "require-dev": { + "phpunit/phpunit": "^11.5.42", + "symfony/error-handler": "^7.3.2 || ^8.0", + "symfony/phpunit-bridge": "^7.3.2 || ^8.0" + }, "autoload": { "psr-4": { "AsyncAws\\AppSync\\": "src" diff --git a/src/Service/AppSync/phpunit.xml.dist b/src/Service/AppSync/phpunit.xml.dist index 9894ce353..20f6abf4c 100644 --- a/src/Service/AppSync/phpunit.xml.dist +++ b/src/Service/AppSync/phpunit.xml.dist @@ -1,17 +1,22 @@ - + ./src - + + trigger_deprecation + + @@ -20,4 +25,7 @@ ./tests/ + + + diff --git a/src/Service/Athena/.github/workflows/ci.yml b/src/Service/Athena/.github/workflows/ci.yml index f8cd96e76..fd44f8c70 100644 --- a/src/Service/Athena/.github/workflows/ci.yml +++ b/src/Service/Athena/.github/workflows/ci.yml @@ -31,8 +31,7 @@ jobs: - name: Download dependencies run: | composer config minimum-stability dev - composer req symfony/phpunit-bridge --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/src/Service/Athena/Makefile b/src/Service/Athena/Makefile index 850dffccd..771133a06 100644 --- a/src/Service/Athena/Makefile +++ b/src/Service/Athena/Makefile @@ -5,7 +5,7 @@ start-docker: echo "Noop" test: initialize - ./vendor/bin/simple-phpunit + ./vendor/bin/phpunit clean: stop-docker stop-docker: diff --git a/src/Service/Athena/composer.json b/src/Service/Athena/composer.json index cac66a28a..66f9b108e 100644 --- a/src/Service/Athena/composer.json +++ b/src/Service/Athena/composer.json @@ -17,6 +17,11 @@ "async-aws/core": "^1.9", "symfony/polyfill-uuid": "^1.13.1" }, + "require-dev": { + "phpunit/phpunit": "^11.5.42", + "symfony/error-handler": "^7.3.2 || ^8.0", + "symfony/phpunit-bridge": "^7.3.2 || ^8.0" + }, "autoload": { "psr-4": { "AsyncAws\\Athena\\": "src" diff --git a/src/Service/Athena/phpunit.xml.dist b/src/Service/Athena/phpunit.xml.dist index 9894ce353..20f6abf4c 100644 --- a/src/Service/Athena/phpunit.xml.dist +++ b/src/Service/Athena/phpunit.xml.dist @@ -1,17 +1,22 @@ - + ./src - + + trigger_deprecation + + @@ -20,4 +25,7 @@ ./tests/ + + + diff --git a/src/Service/Athena/tests/Unit/Input/StartCalculationExecutionRequestTest.php b/src/Service/Athena/tests/Unit/Input/StartCalculationExecutionRequestTest.php index fbdaadac2..d8982f17f 100644 --- a/src/Service/Athena/tests/Unit/Input/StartCalculationExecutionRequestTest.php +++ b/src/Service/Athena/tests/Unit/Input/StartCalculationExecutionRequestTest.php @@ -5,14 +5,11 @@ use AsyncAws\Athena\Input\StartCalculationExecutionRequest; use AsyncAws\Athena\ValueObject\CalculationConfiguration; use AsyncAws\Core\Test\TestCase; +use PHPUnit\Framework\Attributes\IgnoreDeprecations; class StartCalculationExecutionRequestTest extends TestCase { - /** - * @group legacy - * - * @expectedDeprecation The property "CalculationConfiguration" of "%s" is deprecated by AWS. - */ + #[IgnoreDeprecations] public function testRequest(): void { $input = new StartCalculationExecutionRequest([ @@ -43,6 +40,8 @@ public function testRequest(): void } '; + $this->expectUserDeprecationMessage('The property "CalculationConfiguration" of "AsyncAws\Athena\Input\StartCalculationExecutionRequest" is deprecated by AWS.'); + self::assertRequestEqualsHttpRequest($expected, $input->request()); } } diff --git a/src/Service/BedrockRuntime/.github/workflows/ci.yml b/src/Service/BedrockRuntime/.github/workflows/ci.yml index f8cd96e76..fd44f8c70 100644 --- a/src/Service/BedrockRuntime/.github/workflows/ci.yml +++ b/src/Service/BedrockRuntime/.github/workflows/ci.yml @@ -31,8 +31,7 @@ jobs: - name: Download dependencies run: | composer config minimum-stability dev - composer req symfony/phpunit-bridge --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/src/Service/BedrockRuntime/Makefile b/src/Service/BedrockRuntime/Makefile index 850dffccd..771133a06 100644 --- a/src/Service/BedrockRuntime/Makefile +++ b/src/Service/BedrockRuntime/Makefile @@ -5,7 +5,7 @@ start-docker: echo "Noop" test: initialize - ./vendor/bin/simple-phpunit + ./vendor/bin/phpunit clean: stop-docker stop-docker: diff --git a/src/Service/BedrockRuntime/composer.json b/src/Service/BedrockRuntime/composer.json index c00ad4c11..3abb777bb 100644 --- a/src/Service/BedrockRuntime/composer.json +++ b/src/Service/BedrockRuntime/composer.json @@ -14,6 +14,11 @@ "php": "^8.2", "async-aws/core": "^1.9" }, + "require-dev": { + "phpunit/phpunit": "^11.5.42", + "symfony/error-handler": "^7.3.2 || ^8.0", + "symfony/phpunit-bridge": "^7.3.2 || ^8.0" + }, "autoload": { "psr-4": { "AsyncAws\\BedrockRuntime\\": "src" diff --git a/src/Service/BedrockRuntime/phpunit.xml.dist b/src/Service/BedrockRuntime/phpunit.xml.dist index 9894ce353..20f6abf4c 100644 --- a/src/Service/BedrockRuntime/phpunit.xml.dist +++ b/src/Service/BedrockRuntime/phpunit.xml.dist @@ -1,17 +1,22 @@ - + ./src - + + trigger_deprecation + + @@ -20,4 +25,7 @@ ./tests/ + + + diff --git a/src/Service/CloudFormation/.github/workflows/ci.yml b/src/Service/CloudFormation/.github/workflows/ci.yml index f8cd96e76..fd44f8c70 100644 --- a/src/Service/CloudFormation/.github/workflows/ci.yml +++ b/src/Service/CloudFormation/.github/workflows/ci.yml @@ -31,8 +31,7 @@ jobs: - name: Download dependencies run: | composer config minimum-stability dev - composer req symfony/phpunit-bridge --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/src/Service/CloudFormation/Makefile b/src/Service/CloudFormation/Makefile index d51bace0e..659492be8 100644 --- a/src/Service/CloudFormation/Makefile +++ b/src/Service/CloudFormation/Makefile @@ -9,7 +9,7 @@ start-docker: docker run --rm --link async_aws_localstack-cloudformation:localstack martin/wait -c localstack:4566 test: initialize - ./vendor/bin/simple-phpunit + ./vendor/bin/phpunit clean: stop-docker stop-docker: diff --git a/src/Service/CloudFormation/composer.json b/src/Service/CloudFormation/composer.json index caad8eaaa..c882f9245 100644 --- a/src/Service/CloudFormation/composer.json +++ b/src/Service/CloudFormation/composer.json @@ -16,6 +16,11 @@ "ext-simplexml": "*", "async-aws/core": "^1.9" }, + "require-dev": { + "phpunit/phpunit": "^11.5.42", + "symfony/error-handler": "^7.3.2 || ^8.0", + "symfony/phpunit-bridge": "^7.3.2 || ^8.0" + }, "autoload": { "psr-4": { "AsyncAws\\CloudFormation\\": "src" diff --git a/src/Service/CloudFormation/phpunit.xml.dist b/src/Service/CloudFormation/phpunit.xml.dist index 9894ce353..20f6abf4c 100644 --- a/src/Service/CloudFormation/phpunit.xml.dist +++ b/src/Service/CloudFormation/phpunit.xml.dist @@ -1,17 +1,22 @@ - + ./src - + + trigger_deprecation + + @@ -20,4 +25,7 @@ ./tests/ + + + diff --git a/src/Service/CloudFront/.github/workflows/ci.yml b/src/Service/CloudFront/.github/workflows/ci.yml index f8cd96e76..fd44f8c70 100644 --- a/src/Service/CloudFront/.github/workflows/ci.yml +++ b/src/Service/CloudFront/.github/workflows/ci.yml @@ -31,8 +31,7 @@ jobs: - name: Download dependencies run: | composer config minimum-stability dev - composer req symfony/phpunit-bridge --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/src/Service/CloudFront/Makefile b/src/Service/CloudFront/Makefile index 850dffccd..771133a06 100644 --- a/src/Service/CloudFront/Makefile +++ b/src/Service/CloudFront/Makefile @@ -5,7 +5,7 @@ start-docker: echo "Noop" test: initialize - ./vendor/bin/simple-phpunit + ./vendor/bin/phpunit clean: stop-docker stop-docker: diff --git a/src/Service/CloudFront/composer.json b/src/Service/CloudFront/composer.json index 615c847fd..07d2d8cb7 100644 --- a/src/Service/CloudFront/composer.json +++ b/src/Service/CloudFront/composer.json @@ -16,6 +16,11 @@ "ext-simplexml": "*", "async-aws/core": "^1.9" }, + "require-dev": { + "phpunit/phpunit": "^11.5.42", + "symfony/error-handler": "^7.3.2 || ^8.0", + "symfony/phpunit-bridge": "^7.3.2 || ^8.0" + }, "autoload": { "psr-4": { "AsyncAws\\CloudFront\\": "src" diff --git a/src/Service/CloudFront/phpunit.xml.dist b/src/Service/CloudFront/phpunit.xml.dist index 9894ce353..20f6abf4c 100644 --- a/src/Service/CloudFront/phpunit.xml.dist +++ b/src/Service/CloudFront/phpunit.xml.dist @@ -1,17 +1,22 @@ - + ./src - + + trigger_deprecation + + @@ -20,4 +25,7 @@ ./tests/ + + + diff --git a/src/Service/CloudWatch/.github/workflows/ci.yml b/src/Service/CloudWatch/.github/workflows/ci.yml index f8cd96e76..fd44f8c70 100644 --- a/src/Service/CloudWatch/.github/workflows/ci.yml +++ b/src/Service/CloudWatch/.github/workflows/ci.yml @@ -31,8 +31,7 @@ jobs: - name: Download dependencies run: | composer config minimum-stability dev - composer req symfony/phpunit-bridge --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/src/Service/CloudWatch/Makefile b/src/Service/CloudWatch/Makefile index 850dffccd..771133a06 100644 --- a/src/Service/CloudWatch/Makefile +++ b/src/Service/CloudWatch/Makefile @@ -5,7 +5,7 @@ start-docker: echo "Noop" test: initialize - ./vendor/bin/simple-phpunit + ./vendor/bin/phpunit clean: stop-docker stop-docker: diff --git a/src/Service/CloudWatch/composer.json b/src/Service/CloudWatch/composer.json index 26f29d28f..c5125da6c 100644 --- a/src/Service/CloudWatch/composer.json +++ b/src/Service/CloudWatch/composer.json @@ -15,6 +15,11 @@ "ext-simplexml": "*", "async-aws/core": "^1.9" }, + "require-dev": { + "phpunit/phpunit": "^11.5.42", + "symfony/error-handler": "^7.3.2 || ^8.0", + "symfony/phpunit-bridge": "^7.3.2 || ^8.0" + }, "autoload": { "psr-4": { "AsyncAws\\CloudWatch\\": "src" diff --git a/src/Service/CloudWatch/phpunit.xml.dist b/src/Service/CloudWatch/phpunit.xml.dist index 9894ce353..20f6abf4c 100644 --- a/src/Service/CloudWatch/phpunit.xml.dist +++ b/src/Service/CloudWatch/phpunit.xml.dist @@ -1,17 +1,22 @@ - + ./src - + + trigger_deprecation + + @@ -20,4 +25,7 @@ ./tests/ + + + diff --git a/src/Service/CloudWatchLogs/.github/workflows/ci.yml b/src/Service/CloudWatchLogs/.github/workflows/ci.yml index f8cd96e76..fd44f8c70 100644 --- a/src/Service/CloudWatchLogs/.github/workflows/ci.yml +++ b/src/Service/CloudWatchLogs/.github/workflows/ci.yml @@ -31,8 +31,7 @@ jobs: - name: Download dependencies run: | composer config minimum-stability dev - composer req symfony/phpunit-bridge --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/src/Service/CloudWatchLogs/Makefile b/src/Service/CloudWatchLogs/Makefile index 985c3ea58..9ca20d5db 100644 --- a/src/Service/CloudWatchLogs/Makefile +++ b/src/Service/CloudWatchLogs/Makefile @@ -9,7 +9,7 @@ start-docker: docker run --rm --link async_aws_localstack-logs:localstack martin/wait -c localstack:4566 test: initialize - ./vendor/bin/simple-phpunit + ./vendor/bin/phpunit clean: stop-docker stop-docker: diff --git a/src/Service/CloudWatchLogs/composer.json b/src/Service/CloudWatchLogs/composer.json index 9638e79f9..30a724ce5 100644 --- a/src/Service/CloudWatchLogs/composer.json +++ b/src/Service/CloudWatchLogs/composer.json @@ -17,6 +17,11 @@ "ext-json": "*", "async-aws/core": "^1.9" }, + "require-dev": { + "phpunit/phpunit": "^11.5.42", + "symfony/error-handler": "^7.3.2 || ^8.0", + "symfony/phpunit-bridge": "^7.3.2 || ^8.0" + }, "autoload": { "psr-4": { "AsyncAws\\CloudWatchLogs\\": "src" diff --git a/src/Service/CloudWatchLogs/phpunit.xml.dist b/src/Service/CloudWatchLogs/phpunit.xml.dist index 9894ce353..20f6abf4c 100644 --- a/src/Service/CloudWatchLogs/phpunit.xml.dist +++ b/src/Service/CloudWatchLogs/phpunit.xml.dist @@ -1,17 +1,22 @@ - + ./src - + + trigger_deprecation + + @@ -20,4 +25,7 @@ ./tests/ + + + diff --git a/src/Service/CloudWatchLogs/tests/Unit/Result/DescribeLogStreamsResponseTest.php b/src/Service/CloudWatchLogs/tests/Unit/Result/DescribeLogStreamsResponseTest.php index 1914fa3cb..3aa11a2e6 100644 --- a/src/Service/CloudWatchLogs/tests/Unit/Result/DescribeLogStreamsResponseTest.php +++ b/src/Service/CloudWatchLogs/tests/Unit/Result/DescribeLogStreamsResponseTest.php @@ -7,6 +7,7 @@ use AsyncAws\Core\Response; use AsyncAws\Core\Test\Http\SimpleMockedResponse; use AsyncAws\Core\Test\TestCase; +use PHPUnit\Framework\Attributes\IgnoreDeprecations; use Psr\Log\NullLogger; use Symfony\Component\HttpClient\MockHttpClient; @@ -56,11 +57,7 @@ public function testDescribeLogStreamsResponse(): void self::assertSame('88602967394531410094953670125156212707622379445839968487', $logStreams[0]->getUploadSequenceToken()); } - /** - * @group legacy - * - * @expectedDeprecation The property "storedBytes" of "%s" is deprecated by AWS. - */ + #[IgnoreDeprecations] public function testDescribeLogStreamsResponseDeprecatedAttribute(): void { // see https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_DescribeLogStreams.html @@ -85,6 +82,8 @@ public function testDescribeLogStreamsResponseDeprecatedAttribute(): void /** @var LogStream[] $logStreams */ $logStreams = iterator_to_array($result->getLogStreams(true)); + $this->expectUserDeprecationMessage('The property "storedBytes" of "AsyncAws\CloudWatchLogs\ValueObject\LogStream" is deprecated by AWS.'); + self::assertSame(0, $logStreams[0]->getStoredBytes()); } } diff --git a/src/Service/CodeBuild/.github/workflows/ci.yml b/src/Service/CodeBuild/.github/workflows/ci.yml index f8cd96e76..fd44f8c70 100644 --- a/src/Service/CodeBuild/.github/workflows/ci.yml +++ b/src/Service/CodeBuild/.github/workflows/ci.yml @@ -31,8 +31,7 @@ jobs: - name: Download dependencies run: | composer config minimum-stability dev - composer req symfony/phpunit-bridge --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/src/Service/CodeBuild/Makefile b/src/Service/CodeBuild/Makefile index 850dffccd..771133a06 100644 --- a/src/Service/CodeBuild/Makefile +++ b/src/Service/CodeBuild/Makefile @@ -5,7 +5,7 @@ start-docker: echo "Noop" test: initialize - ./vendor/bin/simple-phpunit + ./vendor/bin/phpunit clean: stop-docker stop-docker: diff --git a/src/Service/CodeBuild/composer.json b/src/Service/CodeBuild/composer.json index 2c43a4970..a2d507edc 100644 --- a/src/Service/CodeBuild/composer.json +++ b/src/Service/CodeBuild/composer.json @@ -16,6 +16,11 @@ "ext-json": "*", "async-aws/core": "^1.9" }, + "require-dev": { + "phpunit/phpunit": "^11.5.42", + "symfony/error-handler": "^7.3.2 || ^8.0", + "symfony/phpunit-bridge": "^7.3.2 || ^8.0" + }, "autoload": { "psr-4": { "AsyncAws\\CodeBuild\\": "src" diff --git a/src/Service/CodeBuild/phpunit.xml.dist b/src/Service/CodeBuild/phpunit.xml.dist index 9894ce353..20f6abf4c 100644 --- a/src/Service/CodeBuild/phpunit.xml.dist +++ b/src/Service/CodeBuild/phpunit.xml.dist @@ -1,17 +1,22 @@ - + ./src - + + trigger_deprecation + + @@ -20,4 +25,7 @@ ./tests/ + + + diff --git a/src/Service/CodeCommit/.github/workflows/ci.yml b/src/Service/CodeCommit/.github/workflows/ci.yml index f8cd96e76..fd44f8c70 100644 --- a/src/Service/CodeCommit/.github/workflows/ci.yml +++ b/src/Service/CodeCommit/.github/workflows/ci.yml @@ -31,8 +31,7 @@ jobs: - name: Download dependencies run: | composer config minimum-stability dev - composer req symfony/phpunit-bridge --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/src/Service/CodeCommit/Makefile b/src/Service/CodeCommit/Makefile index 850dffccd..771133a06 100644 --- a/src/Service/CodeCommit/Makefile +++ b/src/Service/CodeCommit/Makefile @@ -5,7 +5,7 @@ start-docker: echo "Noop" test: initialize - ./vendor/bin/simple-phpunit + ./vendor/bin/phpunit clean: stop-docker stop-docker: diff --git a/src/Service/CodeCommit/composer.json b/src/Service/CodeCommit/composer.json index 0f3b58a9d..daf281ae1 100644 --- a/src/Service/CodeCommit/composer.json +++ b/src/Service/CodeCommit/composer.json @@ -15,6 +15,11 @@ "ext-json": "*", "async-aws/core": "^1.9" }, + "require-dev": { + "phpunit/phpunit": "^11.5.42", + "symfony/error-handler": "^7.3.2 || ^8.0", + "symfony/phpunit-bridge": "^7.3.2 || ^8.0" + }, "autoload": { "psr-4": { "AsyncAws\\CodeCommit\\": "src" diff --git a/src/Service/CodeCommit/phpunit.xml.dist b/src/Service/CodeCommit/phpunit.xml.dist index 9894ce353..20f6abf4c 100644 --- a/src/Service/CodeCommit/phpunit.xml.dist +++ b/src/Service/CodeCommit/phpunit.xml.dist @@ -1,17 +1,22 @@ - + ./src - + + trigger_deprecation + + @@ -20,4 +25,7 @@ ./tests/ + + + diff --git a/src/Service/CodeDeploy/.github/workflows/ci.yml b/src/Service/CodeDeploy/.github/workflows/ci.yml index f8cd96e76..fd44f8c70 100644 --- a/src/Service/CodeDeploy/.github/workflows/ci.yml +++ b/src/Service/CodeDeploy/.github/workflows/ci.yml @@ -31,8 +31,7 @@ jobs: - name: Download dependencies run: | composer config minimum-stability dev - composer req symfony/phpunit-bridge --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/src/Service/CodeDeploy/Makefile b/src/Service/CodeDeploy/Makefile index 850dffccd..771133a06 100644 --- a/src/Service/CodeDeploy/Makefile +++ b/src/Service/CodeDeploy/Makefile @@ -5,7 +5,7 @@ start-docker: echo "Noop" test: initialize - ./vendor/bin/simple-phpunit + ./vendor/bin/phpunit clean: stop-docker stop-docker: diff --git a/src/Service/CodeDeploy/composer.json b/src/Service/CodeDeploy/composer.json index f6f6f0660..50c9eedaf 100644 --- a/src/Service/CodeDeploy/composer.json +++ b/src/Service/CodeDeploy/composer.json @@ -16,6 +16,11 @@ "ext-json": "*", "async-aws/core": "^1.9" }, + "require-dev": { + "phpunit/phpunit": "^11.5.42", + "symfony/error-handler": "^7.3.2 || ^8.0", + "symfony/phpunit-bridge": "^7.3.2 || ^8.0" + }, "autoload": { "psr-4": { "AsyncAws\\CodeDeploy\\": "src" diff --git a/src/Service/CodeDeploy/phpunit.xml.dist b/src/Service/CodeDeploy/phpunit.xml.dist index 9894ce353..20f6abf4c 100644 --- a/src/Service/CodeDeploy/phpunit.xml.dist +++ b/src/Service/CodeDeploy/phpunit.xml.dist @@ -1,17 +1,22 @@ - + ./src - + + trigger_deprecation + + @@ -20,4 +25,7 @@ ./tests/ + + + diff --git a/src/Service/CognitoIdentityProvider/.github/workflows/ci.yml b/src/Service/CognitoIdentityProvider/.github/workflows/ci.yml index f8cd96e76..fd44f8c70 100644 --- a/src/Service/CognitoIdentityProvider/.github/workflows/ci.yml +++ b/src/Service/CognitoIdentityProvider/.github/workflows/ci.yml @@ -31,8 +31,7 @@ jobs: - name: Download dependencies run: | composer config minimum-stability dev - composer req symfony/phpunit-bridge --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/src/Service/CognitoIdentityProvider/Makefile b/src/Service/CognitoIdentityProvider/Makefile index 850dffccd..771133a06 100644 --- a/src/Service/CognitoIdentityProvider/Makefile +++ b/src/Service/CognitoIdentityProvider/Makefile @@ -5,7 +5,7 @@ start-docker: echo "Noop" test: initialize - ./vendor/bin/simple-phpunit + ./vendor/bin/phpunit clean: stop-docker stop-docker: diff --git a/src/Service/CognitoIdentityProvider/composer.json b/src/Service/CognitoIdentityProvider/composer.json index a8dba758a..3ce364dcb 100644 --- a/src/Service/CognitoIdentityProvider/composer.json +++ b/src/Service/CognitoIdentityProvider/composer.json @@ -16,6 +16,11 @@ "ext-json": "*", "async-aws/core": "^1.9" }, + "require-dev": { + "phpunit/phpunit": "^11.5.42", + "symfony/error-handler": "^7.3.2 || ^8.0", + "symfony/phpunit-bridge": "^7.3.2 || ^8.0" + }, "autoload": { "psr-4": { "AsyncAws\\CognitoIdentityProvider\\": "src" diff --git a/src/Service/CognitoIdentityProvider/phpunit.xml.dist b/src/Service/CognitoIdentityProvider/phpunit.xml.dist index 9894ce353..20f6abf4c 100644 --- a/src/Service/CognitoIdentityProvider/phpunit.xml.dist +++ b/src/Service/CognitoIdentityProvider/phpunit.xml.dist @@ -1,17 +1,22 @@ - + ./src - + + trigger_deprecation + + @@ -20,4 +25,7 @@ ./tests/ + + + diff --git a/src/Service/Comprehend/.github/workflows/ci.yml b/src/Service/Comprehend/.github/workflows/ci.yml index f8cd96e76..fd44f8c70 100644 --- a/src/Service/Comprehend/.github/workflows/ci.yml +++ b/src/Service/Comprehend/.github/workflows/ci.yml @@ -31,8 +31,7 @@ jobs: - name: Download dependencies run: | composer config minimum-stability dev - composer req symfony/phpunit-bridge --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/src/Service/Comprehend/Makefile b/src/Service/Comprehend/Makefile index 850dffccd..771133a06 100644 --- a/src/Service/Comprehend/Makefile +++ b/src/Service/Comprehend/Makefile @@ -5,7 +5,7 @@ start-docker: echo "Noop" test: initialize - ./vendor/bin/simple-phpunit + ./vendor/bin/phpunit clean: stop-docker stop-docker: diff --git a/src/Service/Comprehend/composer.json b/src/Service/Comprehend/composer.json index 6d4e47670..a65a0d994 100644 --- a/src/Service/Comprehend/composer.json +++ b/src/Service/Comprehend/composer.json @@ -15,6 +15,11 @@ "ext-json": "*", "async-aws/core": "^1.9" }, + "require-dev": { + "phpunit/phpunit": "^11.5.42", + "symfony/error-handler": "^7.3.2 || ^8.0", + "symfony/phpunit-bridge": "^7.3.2 || ^8.0" + }, "autoload": { "psr-4": { "AsyncAws\\Comprehend\\": "src" diff --git a/src/Service/Comprehend/phpunit.xml.dist b/src/Service/Comprehend/phpunit.xml.dist index 9894ce353..20f6abf4c 100644 --- a/src/Service/Comprehend/phpunit.xml.dist +++ b/src/Service/Comprehend/phpunit.xml.dist @@ -1,17 +1,22 @@ - + ./src - + + trigger_deprecation + + @@ -20,4 +25,7 @@ ./tests/ + + + diff --git a/src/Service/DynamoDb/.github/workflows/ci.yml b/src/Service/DynamoDb/.github/workflows/ci.yml index f8cd96e76..fd44f8c70 100644 --- a/src/Service/DynamoDb/.github/workflows/ci.yml +++ b/src/Service/DynamoDb/.github/workflows/ci.yml @@ -31,8 +31,7 @@ jobs: - name: Download dependencies run: | composer config minimum-stability dev - composer req symfony/phpunit-bridge --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/src/Service/DynamoDb/Makefile b/src/Service/DynamoDb/Makefile index 925f6266a..4938b1b27 100644 --- a/src/Service/DynamoDb/Makefile +++ b/src/Service/DynamoDb/Makefile @@ -9,7 +9,7 @@ start-docker: docker run --rm --link async_aws_localstack-dynamodb:localstack martin/wait -c localstack:4566 test: initialize - ./vendor/bin/simple-phpunit + ./vendor/bin/phpunit clean: stop-docker stop-docker: diff --git a/src/Service/DynamoDb/composer.json b/src/Service/DynamoDb/composer.json index 99d47ed13..b97ad5941 100644 --- a/src/Service/DynamoDb/composer.json +++ b/src/Service/DynamoDb/composer.json @@ -17,6 +17,11 @@ "async-aws/core": "^1.16", "symfony/polyfill-uuid": "^1.13.1" }, + "require-dev": { + "phpunit/phpunit": "^11.5.42", + "symfony/error-handler": "^7.3.2 || ^8.0", + "symfony/phpunit-bridge": "^7.3.2 || ^8.0" + }, "conflict": { "symfony/http-client": "<4.4.16 <5.1.7" }, diff --git a/src/Service/DynamoDb/phpunit.xml.dist b/src/Service/DynamoDb/phpunit.xml.dist index 9894ce353..20f6abf4c 100644 --- a/src/Service/DynamoDb/phpunit.xml.dist +++ b/src/Service/DynamoDb/phpunit.xml.dist @@ -1,17 +1,22 @@ - + ./src - + + trigger_deprecation + + @@ -20,4 +25,7 @@ ./tests/ + + + diff --git a/src/Service/Ecr/.github/workflows/ci.yml b/src/Service/Ecr/.github/workflows/ci.yml index f8cd96e76..fd44f8c70 100644 --- a/src/Service/Ecr/.github/workflows/ci.yml +++ b/src/Service/Ecr/.github/workflows/ci.yml @@ -31,8 +31,7 @@ jobs: - name: Download dependencies run: | composer config minimum-stability dev - composer req symfony/phpunit-bridge --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/src/Service/Ecr/Makefile b/src/Service/Ecr/Makefile index 850dffccd..771133a06 100644 --- a/src/Service/Ecr/Makefile +++ b/src/Service/Ecr/Makefile @@ -5,7 +5,7 @@ start-docker: echo "Noop" test: initialize - ./vendor/bin/simple-phpunit + ./vendor/bin/phpunit clean: stop-docker stop-docker: diff --git a/src/Service/Ecr/composer.json b/src/Service/Ecr/composer.json index 0b01a6603..879952896 100644 --- a/src/Service/Ecr/composer.json +++ b/src/Service/Ecr/composer.json @@ -17,6 +17,11 @@ "ext-json": "*", "async-aws/core": "^1.9" }, + "require-dev": { + "phpunit/phpunit": "^11.5.42", + "symfony/error-handler": "^7.3.2 || ^8.0", + "symfony/phpunit-bridge": "^7.3.2 || ^8.0" + }, "autoload": { "psr-4": { "AsyncAws\\Ecr\\": "src" diff --git a/src/Service/Ecr/phpunit.xml.dist b/src/Service/Ecr/phpunit.xml.dist index 9894ce353..20f6abf4c 100644 --- a/src/Service/Ecr/phpunit.xml.dist +++ b/src/Service/Ecr/phpunit.xml.dist @@ -1,17 +1,22 @@ - + ./src - + + trigger_deprecation + + @@ -20,4 +25,7 @@ ./tests/ + + + diff --git a/src/Service/ElastiCache/.github/workflows/ci.yml b/src/Service/ElastiCache/.github/workflows/ci.yml index f8cd96e76..fd44f8c70 100644 --- a/src/Service/ElastiCache/.github/workflows/ci.yml +++ b/src/Service/ElastiCache/.github/workflows/ci.yml @@ -31,8 +31,7 @@ jobs: - name: Download dependencies run: | composer config minimum-stability dev - composer req symfony/phpunit-bridge --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/src/Service/ElastiCache/Makefile b/src/Service/ElastiCache/Makefile index 850dffccd..771133a06 100644 --- a/src/Service/ElastiCache/Makefile +++ b/src/Service/ElastiCache/Makefile @@ -5,7 +5,7 @@ start-docker: echo "Noop" test: initialize - ./vendor/bin/simple-phpunit + ./vendor/bin/phpunit clean: stop-docker stop-docker: diff --git a/src/Service/ElastiCache/composer.json b/src/Service/ElastiCache/composer.json index 1a30aef45..4e8deb8af 100644 --- a/src/Service/ElastiCache/composer.json +++ b/src/Service/ElastiCache/composer.json @@ -16,6 +16,11 @@ "ext-simplexml": "*", "async-aws/core": "^1.9" }, + "require-dev": { + "phpunit/phpunit": "^11.5.42", + "symfony/error-handler": "^7.3.2 || ^8.0", + "symfony/phpunit-bridge": "^7.3.2 || ^8.0" + }, "autoload": { "psr-4": { "AsyncAws\\ElastiCache\\": "src" diff --git a/src/Service/ElastiCache/phpunit.xml.dist b/src/Service/ElastiCache/phpunit.xml.dist index 9894ce353..20f6abf4c 100644 --- a/src/Service/ElastiCache/phpunit.xml.dist +++ b/src/Service/ElastiCache/phpunit.xml.dist @@ -1,17 +1,22 @@ - + ./src - + + trigger_deprecation + + @@ -20,4 +25,7 @@ ./tests/ + + + diff --git a/src/Service/EventBridge/.github/workflows/ci.yml b/src/Service/EventBridge/.github/workflows/ci.yml index f8cd96e76..fd44f8c70 100644 --- a/src/Service/EventBridge/.github/workflows/ci.yml +++ b/src/Service/EventBridge/.github/workflows/ci.yml @@ -31,8 +31,7 @@ jobs: - name: Download dependencies run: | composer config minimum-stability dev - composer req symfony/phpunit-bridge --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/src/Service/EventBridge/Makefile b/src/Service/EventBridge/Makefile index 6a8220d89..78518e951 100644 --- a/src/Service/EventBridge/Makefile +++ b/src/Service/EventBridge/Makefile @@ -9,7 +9,7 @@ start-docker: docker run --rm --link async_aws_localstack-events:localstack martin/wait -c localstack:4566 test: initialize - ./vendor/bin/simple-phpunit + ./vendor/bin/phpunit clean: stop-docker stop-docker: diff --git a/src/Service/EventBridge/composer.json b/src/Service/EventBridge/composer.json index 7ec5ab73e..3dcf29095 100644 --- a/src/Service/EventBridge/composer.json +++ b/src/Service/EventBridge/composer.json @@ -15,6 +15,11 @@ "ext-json": "*", "async-aws/core": "^1.9" }, + "require-dev": { + "phpunit/phpunit": "^11.5.42", + "symfony/error-handler": "^7.3.2 || ^8.0", + "symfony/phpunit-bridge": "^7.3.2 || ^8.0" + }, "autoload": { "psr-4": { "AsyncAws\\EventBridge\\": "src" diff --git a/src/Service/EventBridge/phpunit.xml.dist b/src/Service/EventBridge/phpunit.xml.dist index 9894ce353..20f6abf4c 100644 --- a/src/Service/EventBridge/phpunit.xml.dist +++ b/src/Service/EventBridge/phpunit.xml.dist @@ -1,17 +1,22 @@ - + ./src - + + trigger_deprecation + + @@ -20,4 +25,7 @@ ./tests/ + + + diff --git a/src/Service/Firehose/.github/workflows/ci.yml b/src/Service/Firehose/.github/workflows/ci.yml index f8cd96e76..fd44f8c70 100644 --- a/src/Service/Firehose/.github/workflows/ci.yml +++ b/src/Service/Firehose/.github/workflows/ci.yml @@ -31,8 +31,7 @@ jobs: - name: Download dependencies run: | composer config minimum-stability dev - composer req symfony/phpunit-bridge --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/src/Service/Firehose/Makefile b/src/Service/Firehose/Makefile index 850dffccd..771133a06 100644 --- a/src/Service/Firehose/Makefile +++ b/src/Service/Firehose/Makefile @@ -5,7 +5,7 @@ start-docker: echo "Noop" test: initialize - ./vendor/bin/simple-phpunit + ./vendor/bin/phpunit clean: stop-docker stop-docker: diff --git a/src/Service/Firehose/composer.json b/src/Service/Firehose/composer.json index bcba896b6..e90d9ba09 100644 --- a/src/Service/Firehose/composer.json +++ b/src/Service/Firehose/composer.json @@ -16,6 +16,11 @@ "ext-json": "*", "async-aws/core": "^1.9" }, + "require-dev": { + "phpunit/phpunit": "^11.5.42", + "symfony/error-handler": "^7.3.2 || ^8.0", + "symfony/phpunit-bridge": "^7.3.2 || ^8.0" + }, "autoload": { "psr-4": { "AsyncAws\\Firehose\\": "src" diff --git a/src/Service/Firehose/phpunit.xml.dist b/src/Service/Firehose/phpunit.xml.dist index 9894ce353..20f6abf4c 100644 --- a/src/Service/Firehose/phpunit.xml.dist +++ b/src/Service/Firehose/phpunit.xml.dist @@ -1,17 +1,22 @@ - + ./src - + + trigger_deprecation + + @@ -20,4 +25,7 @@ ./tests/ + + + diff --git a/src/Service/Iam/.github/workflows/ci.yml b/src/Service/Iam/.github/workflows/ci.yml index f8cd96e76..fd44f8c70 100644 --- a/src/Service/Iam/.github/workflows/ci.yml +++ b/src/Service/Iam/.github/workflows/ci.yml @@ -31,8 +31,7 @@ jobs: - name: Download dependencies run: | composer config minimum-stability dev - composer req symfony/phpunit-bridge --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/src/Service/Iam/Makefile b/src/Service/Iam/Makefile index 5d5a6469a..0fbfd77d6 100644 --- a/src/Service/Iam/Makefile +++ b/src/Service/Iam/Makefile @@ -9,7 +9,7 @@ start-docker: docker run --rm --link async_aws_localstack-iam:localstack martin/wait -c localstack:4566 test: initialize - ./vendor/bin/simple-phpunit + ./vendor/bin/phpunit clean: stop-docker stop-docker: diff --git a/src/Service/Iam/composer.json b/src/Service/Iam/composer.json index da0d78578..e536eb772 100644 --- a/src/Service/Iam/composer.json +++ b/src/Service/Iam/composer.json @@ -19,6 +19,11 @@ "ext-simplexml": "*", "async-aws/core": "^1.9" }, + "require-dev": { + "phpunit/phpunit": "^11.5.42", + "symfony/error-handler": "^7.3.2 || ^8.0", + "symfony/phpunit-bridge": "^7.3.2 || ^8.0" + }, "autoload": { "psr-4": { "AsyncAws\\Iam\\": "src" diff --git a/src/Service/Iam/phpunit.xml.dist b/src/Service/Iam/phpunit.xml.dist index 9894ce353..20f6abf4c 100644 --- a/src/Service/Iam/phpunit.xml.dist +++ b/src/Service/Iam/phpunit.xml.dist @@ -1,17 +1,22 @@ - + ./src - + + trigger_deprecation + + @@ -20,4 +25,7 @@ ./tests/ + + + diff --git a/src/Service/Iot/.github/workflows/ci.yml b/src/Service/Iot/.github/workflows/ci.yml index f8cd96e76..fd44f8c70 100644 --- a/src/Service/Iot/.github/workflows/ci.yml +++ b/src/Service/Iot/.github/workflows/ci.yml @@ -31,8 +31,7 @@ jobs: - name: Download dependencies run: | composer config minimum-stability dev - composer req symfony/phpunit-bridge --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/src/Service/Iot/Makefile b/src/Service/Iot/Makefile index 850dffccd..771133a06 100644 --- a/src/Service/Iot/Makefile +++ b/src/Service/Iot/Makefile @@ -5,7 +5,7 @@ start-docker: echo "Noop" test: initialize - ./vendor/bin/simple-phpunit + ./vendor/bin/phpunit clean: stop-docker stop-docker: diff --git a/src/Service/Iot/composer.json b/src/Service/Iot/composer.json index a6c74f5b7..9985fa668 100644 --- a/src/Service/Iot/composer.json +++ b/src/Service/Iot/composer.json @@ -16,6 +16,11 @@ "ext-json": "*", "async-aws/core": "^1.9" }, + "require-dev": { + "phpunit/phpunit": "^11.5.42", + "symfony/error-handler": "^7.3.2 || ^8.0", + "symfony/phpunit-bridge": "^7.3.2 || ^8.0" + }, "autoload": { "psr-4": { "AsyncAws\\Iot\\": "src" diff --git a/src/Service/Iot/phpunit.xml.dist b/src/Service/Iot/phpunit.xml.dist index 9894ce353..20f6abf4c 100644 --- a/src/Service/Iot/phpunit.xml.dist +++ b/src/Service/Iot/phpunit.xml.dist @@ -1,17 +1,22 @@ - + ./src - + + trigger_deprecation + + @@ -20,4 +25,7 @@ ./tests/ + + + diff --git a/src/Service/IotData/.github/workflows/ci.yml b/src/Service/IotData/.github/workflows/ci.yml index f8cd96e76..fd44f8c70 100644 --- a/src/Service/IotData/.github/workflows/ci.yml +++ b/src/Service/IotData/.github/workflows/ci.yml @@ -31,8 +31,7 @@ jobs: - name: Download dependencies run: | composer config minimum-stability dev - composer req symfony/phpunit-bridge --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/src/Service/IotData/Makefile b/src/Service/IotData/Makefile index 850dffccd..771133a06 100644 --- a/src/Service/IotData/Makefile +++ b/src/Service/IotData/Makefile @@ -5,7 +5,7 @@ start-docker: echo "Noop" test: initialize - ./vendor/bin/simple-phpunit + ./vendor/bin/phpunit clean: stop-docker stop-docker: diff --git a/src/Service/IotData/composer.json b/src/Service/IotData/composer.json index 98728ca48..a9c4a0758 100644 --- a/src/Service/IotData/composer.json +++ b/src/Service/IotData/composer.json @@ -14,6 +14,11 @@ "php": "^8.2", "async-aws/core": "^1.9" }, + "require-dev": { + "phpunit/phpunit": "^11.5.42", + "symfony/error-handler": "^7.3.2 || ^8.0", + "symfony/phpunit-bridge": "^7.3.2 || ^8.0" + }, "autoload": { "psr-4": { "AsyncAws\\IotData\\": "src" diff --git a/src/Service/IotData/phpunit.xml.dist b/src/Service/IotData/phpunit.xml.dist index 9894ce353..20f6abf4c 100644 --- a/src/Service/IotData/phpunit.xml.dist +++ b/src/Service/IotData/phpunit.xml.dist @@ -1,17 +1,22 @@ - + ./src - + + trigger_deprecation + + @@ -20,4 +25,7 @@ ./tests/ + + + diff --git a/src/Service/Kinesis/.github/workflows/ci.yml b/src/Service/Kinesis/.github/workflows/ci.yml index f8cd96e76..fd44f8c70 100644 --- a/src/Service/Kinesis/.github/workflows/ci.yml +++ b/src/Service/Kinesis/.github/workflows/ci.yml @@ -31,8 +31,7 @@ jobs: - name: Download dependencies run: | composer config minimum-stability dev - composer req symfony/phpunit-bridge --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/src/Service/Kinesis/Makefile b/src/Service/Kinesis/Makefile index 3bf9d82dc..5ed14e62f 100644 --- a/src/Service/Kinesis/Makefile +++ b/src/Service/Kinesis/Makefile @@ -9,7 +9,7 @@ start-docker: docker run --rm --link async_aws_localstack-kinesis:localstack martin/wait -c localstack:4566 test: initialize - ./vendor/bin/simple-phpunit + ./vendor/bin/phpunit clean: stop-docker stop-docker: diff --git a/src/Service/Kinesis/composer.json b/src/Service/Kinesis/composer.json index fe3df125a..8d2597cc0 100644 --- a/src/Service/Kinesis/composer.json +++ b/src/Service/Kinesis/composer.json @@ -16,6 +16,11 @@ "ext-json": "*", "async-aws/core": "^1.9" }, + "require-dev": { + "phpunit/phpunit": "^11.5.42", + "symfony/error-handler": "^7.3.2 || ^8.0", + "symfony/phpunit-bridge": "^7.3.2 || ^8.0" + }, "autoload": { "psr-4": { "AsyncAws\\Kinesis\\": "src" diff --git a/src/Service/Kinesis/phpunit.xml.dist b/src/Service/Kinesis/phpunit.xml.dist index 9894ce353..20f6abf4c 100644 --- a/src/Service/Kinesis/phpunit.xml.dist +++ b/src/Service/Kinesis/phpunit.xml.dist @@ -1,17 +1,22 @@ - + ./src - + + trigger_deprecation + + @@ -20,4 +25,7 @@ ./tests/ + + + diff --git a/src/Service/Kms/.github/workflows/ci.yml b/src/Service/Kms/.github/workflows/ci.yml index f8cd96e76..fd44f8c70 100644 --- a/src/Service/Kms/.github/workflows/ci.yml +++ b/src/Service/Kms/.github/workflows/ci.yml @@ -31,8 +31,7 @@ jobs: - name: Download dependencies run: | composer config minimum-stability dev - composer req symfony/phpunit-bridge --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/src/Service/Kms/Makefile b/src/Service/Kms/Makefile index b2c7b5d23..e7ab73c51 100644 --- a/src/Service/Kms/Makefile +++ b/src/Service/Kms/Makefile @@ -9,7 +9,7 @@ start-docker: docker run --rm --link async_aws_localstack-kms:localstack martin/wait -c localstack:8080 test: initialize - ./vendor/bin/simple-phpunit + ./vendor/bin/phpunit clean: stop-docker stop-docker: diff --git a/src/Service/Kms/composer.json b/src/Service/Kms/composer.json index 5321af05b..78e6cbffe 100644 --- a/src/Service/Kms/composer.json +++ b/src/Service/Kms/composer.json @@ -16,6 +16,11 @@ "ext-json": "*", "async-aws/core": "^1.9" }, + "require-dev": { + "phpunit/phpunit": "^11.5.42", + "symfony/error-handler": "^7.3.2 || ^8.0", + "symfony/phpunit-bridge": "^7.3.2 || ^8.0" + }, "autoload": { "psr-4": { "AsyncAws\\Kms\\": "src" diff --git a/src/Service/Kms/phpunit.xml.dist b/src/Service/Kms/phpunit.xml.dist index 9894ce353..20f6abf4c 100644 --- a/src/Service/Kms/phpunit.xml.dist +++ b/src/Service/Kms/phpunit.xml.dist @@ -1,17 +1,22 @@ - + ./src - + + trigger_deprecation + + @@ -20,4 +25,7 @@ ./tests/ + + + diff --git a/src/Service/Kms/tests/Integration/KmsClientTest.php b/src/Service/Kms/tests/Integration/KmsClientTest.php index 464481ada..f4410f246 100644 --- a/src/Service/Kms/tests/Integration/KmsClientTest.php +++ b/src/Service/Kms/tests/Integration/KmsClientTest.php @@ -147,6 +147,7 @@ public function testListAliases(): void ]); $result = $client->listAliases($input); + $result = iterator_to_array($result); self::assertCount(0, $result); $client->createAlias([ @@ -155,8 +156,9 @@ public function testListAliases(): void ]); $result = $client->listAliases($input); + $result = iterator_to_array($result); self::assertCount(1, $result); - self::assertSame($name, iterator_to_array($result)[0]->getAliasName()); + self::assertSame($name, $result[0]->getAliasName()); } public function testSign(): void diff --git a/src/Service/Lambda/.github/workflows/ci.yml b/src/Service/Lambda/.github/workflows/ci.yml index f8cd96e76..fd44f8c70 100644 --- a/src/Service/Lambda/.github/workflows/ci.yml +++ b/src/Service/Lambda/.github/workflows/ci.yml @@ -31,8 +31,7 @@ jobs: - name: Download dependencies run: | composer config minimum-stability dev - composer req symfony/phpunit-bridge --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/src/Service/Lambda/Makefile b/src/Service/Lambda/Makefile index 486464108..92c19f552 100644 --- a/src/Service/Lambda/Makefile +++ b/src/Service/Lambda/Makefile @@ -9,7 +9,7 @@ start-docker: docker run -d -p 9001:9001 -e DOCKER_LAMBDA_STAY_OPEN=1 -v "$(ROOT_DIR)/tests/fixtures/lambda":/var/task:ro,delegated --name async_aws_lambda lambci/lambda:nodejs12.x index.handler test: initialize - ./vendor/bin/simple-phpunit + ./vendor/bin/phpunit clean: stop-docker stop-docker: diff --git a/src/Service/Lambda/composer.json b/src/Service/Lambda/composer.json index eb703a316..cd1f16a22 100644 --- a/src/Service/Lambda/composer.json +++ b/src/Service/Lambda/composer.json @@ -16,6 +16,11 @@ "ext-json": "*", "async-aws/core": "^1.9" }, + "require-dev": { + "phpunit/phpunit": "^11.5.42", + "symfony/error-handler": "^7.3.2 || ^8.0", + "symfony/phpunit-bridge": "^7.3.2 || ^8.0" + }, "autoload": { "psr-4": { "AsyncAws\\Lambda\\": "src" diff --git a/src/Service/Lambda/phpunit.xml.dist b/src/Service/Lambda/phpunit.xml.dist index 9894ce353..20f6abf4c 100644 --- a/src/Service/Lambda/phpunit.xml.dist +++ b/src/Service/Lambda/phpunit.xml.dist @@ -1,17 +1,22 @@ - + ./src - + + trigger_deprecation + + @@ -20,4 +25,7 @@ ./tests/ + + + diff --git a/src/Service/LocationService/.github/workflows/ci.yml b/src/Service/LocationService/.github/workflows/ci.yml index f8cd96e76..fd44f8c70 100644 --- a/src/Service/LocationService/.github/workflows/ci.yml +++ b/src/Service/LocationService/.github/workflows/ci.yml @@ -31,8 +31,7 @@ jobs: - name: Download dependencies run: | composer config minimum-stability dev - composer req symfony/phpunit-bridge --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/src/Service/LocationService/Makefile b/src/Service/LocationService/Makefile index 850dffccd..771133a06 100644 --- a/src/Service/LocationService/Makefile +++ b/src/Service/LocationService/Makefile @@ -5,7 +5,7 @@ start-docker: echo "Noop" test: initialize - ./vendor/bin/simple-phpunit + ./vendor/bin/phpunit clean: stop-docker stop-docker: diff --git a/src/Service/LocationService/composer.json b/src/Service/LocationService/composer.json index fa8c96342..c99db4f34 100644 --- a/src/Service/LocationService/composer.json +++ b/src/Service/LocationService/composer.json @@ -16,6 +16,11 @@ "ext-json": "*", "async-aws/core": "^1.20" }, + "require-dev": { + "phpunit/phpunit": "^11.5.42", + "symfony/error-handler": "^7.3.2 || ^8.0", + "symfony/phpunit-bridge": "^7.3.2 || ^8.0" + }, "autoload": { "psr-4": { "AsyncAws\\LocationService\\": "src" diff --git a/src/Service/LocationService/phpunit.xml.dist b/src/Service/LocationService/phpunit.xml.dist index 9894ce353..20f6abf4c 100644 --- a/src/Service/LocationService/phpunit.xml.dist +++ b/src/Service/LocationService/phpunit.xml.dist @@ -1,17 +1,22 @@ - + ./src - + + trigger_deprecation + + @@ -20,4 +25,7 @@ ./tests/ + + + diff --git a/src/Service/MediaConvert/.github/workflows/ci.yml b/src/Service/MediaConvert/.github/workflows/ci.yml index f8cd96e76..fd44f8c70 100644 --- a/src/Service/MediaConvert/.github/workflows/ci.yml +++ b/src/Service/MediaConvert/.github/workflows/ci.yml @@ -31,8 +31,7 @@ jobs: - name: Download dependencies run: | composer config minimum-stability dev - composer req symfony/phpunit-bridge --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/src/Service/MediaConvert/Makefile b/src/Service/MediaConvert/Makefile index 850dffccd..771133a06 100644 --- a/src/Service/MediaConvert/Makefile +++ b/src/Service/MediaConvert/Makefile @@ -5,7 +5,7 @@ start-docker: echo "Noop" test: initialize - ./vendor/bin/simple-phpunit + ./vendor/bin/phpunit clean: stop-docker stop-docker: diff --git a/src/Service/MediaConvert/composer.json b/src/Service/MediaConvert/composer.json index 7949ffb3b..4288496a4 100644 --- a/src/Service/MediaConvert/composer.json +++ b/src/Service/MediaConvert/composer.json @@ -16,6 +16,11 @@ "async-aws/core": "^1.9", "symfony/polyfill-uuid": "^1.13.1" }, + "require-dev": { + "phpunit/phpunit": "^11.5.42", + "symfony/error-handler": "^7.3.2 || ^8.0", + "symfony/phpunit-bridge": "^7.3.2 || ^8.0" + }, "autoload": { "psr-4": { "AsyncAws\\MediaConvert\\": "src" diff --git a/src/Service/MediaConvert/phpunit.xml.dist b/src/Service/MediaConvert/phpunit.xml.dist index 9894ce353..20f6abf4c 100644 --- a/src/Service/MediaConvert/phpunit.xml.dist +++ b/src/Service/MediaConvert/phpunit.xml.dist @@ -1,17 +1,22 @@ - + ./src - + + trigger_deprecation + + @@ -20,4 +25,7 @@ ./tests/ + + + diff --git a/src/Service/MediaConvert/tests/Unit/MediaConvertClientTest.php b/src/Service/MediaConvert/tests/Unit/MediaConvertClientTest.php index 1d446510d..a3b2a7fb1 100644 --- a/src/Service/MediaConvert/tests/Unit/MediaConvertClientTest.php +++ b/src/Service/MediaConvert/tests/Unit/MediaConvertClientTest.php @@ -16,6 +16,7 @@ use AsyncAws\MediaConvert\Result\GetJobResponse; use AsyncAws\MediaConvert\Result\ListJobsResponse; use AsyncAws\MediaConvert\ValueObject\JobSettings; +use PHPUnit\Framework\Attributes\IgnoreDeprecations; use Symfony\Component\HttpClient\MockHttpClient; use Symfony\Component\HttpClient\Response\MockResponse; @@ -55,9 +56,7 @@ public function testCreateJob(): void self::assertFalse($result->info()['resolved']); } - /** - * @group legacy - */ + #[IgnoreDeprecations] public function testDescribeEndpoints(): void { $client = new MediaConvertClient([], new NullProvider(), new MockHttpClient()); diff --git a/src/Service/RdsDataService/.github/workflows/ci.yml b/src/Service/RdsDataService/.github/workflows/ci.yml index f8cd96e76..fd44f8c70 100644 --- a/src/Service/RdsDataService/.github/workflows/ci.yml +++ b/src/Service/RdsDataService/.github/workflows/ci.yml @@ -31,8 +31,7 @@ jobs: - name: Download dependencies run: | composer config minimum-stability dev - composer req symfony/phpunit-bridge --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/src/Service/RdsDataService/Makefile b/src/Service/RdsDataService/Makefile index 850dffccd..771133a06 100644 --- a/src/Service/RdsDataService/Makefile +++ b/src/Service/RdsDataService/Makefile @@ -5,7 +5,7 @@ start-docker: echo "Noop" test: initialize - ./vendor/bin/simple-phpunit + ./vendor/bin/phpunit clean: stop-docker stop-docker: diff --git a/src/Service/RdsDataService/composer.json b/src/Service/RdsDataService/composer.json index 6c82df88e..b2bcf6eed 100644 --- a/src/Service/RdsDataService/composer.json +++ b/src/Service/RdsDataService/composer.json @@ -17,6 +17,11 @@ "ext-json": "*", "async-aws/core": "^1.9" }, + "require-dev": { + "phpunit/phpunit": "^11.5.42", + "symfony/error-handler": "^7.3.2 || ^8.0", + "symfony/phpunit-bridge": "^7.3.2 || ^8.0" + }, "autoload": { "psr-4": { "AsyncAws\\RdsDataService\\": "src" diff --git a/src/Service/RdsDataService/phpunit.xml.dist b/src/Service/RdsDataService/phpunit.xml.dist index 9894ce353..20f6abf4c 100644 --- a/src/Service/RdsDataService/phpunit.xml.dist +++ b/src/Service/RdsDataService/phpunit.xml.dist @@ -1,17 +1,22 @@ - + ./src - + + trigger_deprecation + + @@ -20,4 +25,7 @@ ./tests/ + + + diff --git a/src/Service/Rekognition/.github/workflows/ci.yml b/src/Service/Rekognition/.github/workflows/ci.yml index f8cd96e76..fd44f8c70 100644 --- a/src/Service/Rekognition/.github/workflows/ci.yml +++ b/src/Service/Rekognition/.github/workflows/ci.yml @@ -31,8 +31,7 @@ jobs: - name: Download dependencies run: | composer config minimum-stability dev - composer req symfony/phpunit-bridge --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/src/Service/Rekognition/Makefile b/src/Service/Rekognition/Makefile index 850dffccd..771133a06 100644 --- a/src/Service/Rekognition/Makefile +++ b/src/Service/Rekognition/Makefile @@ -5,7 +5,7 @@ start-docker: echo "Noop" test: initialize - ./vendor/bin/simple-phpunit + ./vendor/bin/phpunit clean: stop-docker stop-docker: diff --git a/src/Service/Rekognition/composer.json b/src/Service/Rekognition/composer.json index ebeebe3fb..311a1c058 100644 --- a/src/Service/Rekognition/composer.json +++ b/src/Service/Rekognition/composer.json @@ -16,6 +16,11 @@ "ext-json": "*", "async-aws/core": "^1.9" }, + "require-dev": { + "phpunit/phpunit": "^11.5.42", + "symfony/error-handler": "^7.3.2 || ^8.0", + "symfony/phpunit-bridge": "^7.3.2 || ^8.0" + }, "autoload": { "psr-4": { "AsyncAws\\Rekognition\\": "src" diff --git a/src/Service/Rekognition/phpunit.xml.dist b/src/Service/Rekognition/phpunit.xml.dist index 9894ce353..20f6abf4c 100644 --- a/src/Service/Rekognition/phpunit.xml.dist +++ b/src/Service/Rekognition/phpunit.xml.dist @@ -1,17 +1,22 @@ - + ./src - + + trigger_deprecation + + @@ -20,4 +25,7 @@ ./tests/ + + + diff --git a/src/Service/Route53/.github/workflows/ci.yml b/src/Service/Route53/.github/workflows/ci.yml index f8cd96e76..fd44f8c70 100644 --- a/src/Service/Route53/.github/workflows/ci.yml +++ b/src/Service/Route53/.github/workflows/ci.yml @@ -31,8 +31,7 @@ jobs: - name: Download dependencies run: | composer config minimum-stability dev - composer req symfony/phpunit-bridge --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/src/Service/Route53/Makefile b/src/Service/Route53/Makefile index 5c74df97d..4c6b89c50 100644 --- a/src/Service/Route53/Makefile +++ b/src/Service/Route53/Makefile @@ -9,7 +9,7 @@ start-docker: docker run --rm --link async_aws_localstack-route53:localstack martin/wait -c localstack:4566 test: initialize - ./vendor/bin/simple-phpunit + ./vendor/bin/phpunit clean: stop-docker stop-docker: diff --git a/src/Service/Route53/composer.json b/src/Service/Route53/composer.json index 9cdde7b01..651f3d883 100644 --- a/src/Service/Route53/composer.json +++ b/src/Service/Route53/composer.json @@ -17,6 +17,11 @@ "ext-simplexml": "*", "async-aws/core": "^1.9" }, + "require-dev": { + "phpunit/phpunit": "^11.5.42", + "symfony/error-handler": "^7.3.2 || ^8.0", + "symfony/phpunit-bridge": "^7.3.2 || ^8.0" + }, "autoload": { "psr-4": { "AsyncAws\\Route53\\": "src" diff --git a/src/Service/Route53/phpunit.xml.dist b/src/Service/Route53/phpunit.xml.dist index 9894ce353..20f6abf4c 100644 --- a/src/Service/Route53/phpunit.xml.dist +++ b/src/Service/Route53/phpunit.xml.dist @@ -1,17 +1,22 @@ - + ./src - + + trigger_deprecation + + @@ -20,4 +25,7 @@ ./tests/ + + + diff --git a/src/Service/S3/.github/workflows/ci.yml b/src/Service/S3/.github/workflows/ci.yml index f8cd96e76..fd44f8c70 100644 --- a/src/Service/S3/.github/workflows/ci.yml +++ b/src/Service/S3/.github/workflows/ci.yml @@ -31,8 +31,7 @@ jobs: - name: Download dependencies run: | composer config minimum-stability dev - composer req symfony/phpunit-bridge --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/src/Service/S3/Makefile b/src/Service/S3/Makefile index dfcbd7bfc..758dad064 100644 --- a/src/Service/S3/Makefile +++ b/src/Service/S3/Makefile @@ -8,7 +8,7 @@ start-docker: docker run -d -p 4569:4569 --name async_aws_s3-client asyncaws/testing-s3 test: initialize - ./vendor/bin/simple-phpunit + ./vendor/bin/phpunit clean: stop-docker stop-docker: diff --git a/src/Service/S3/composer.json b/src/Service/S3/composer.json index edbff8a17..3ab580ceb 100644 --- a/src/Service/S3/composer.json +++ b/src/Service/S3/composer.json @@ -18,6 +18,11 @@ "ext-simplexml": "*", "async-aws/core": "^1.22" }, + "require-dev": { + "phpunit/phpunit": "^11.5.42", + "symfony/error-handler": "^7.3.2 || ^8.0", + "symfony/phpunit-bridge": "^7.3.2 || ^8.0" + }, "autoload": { "psr-4": { "AsyncAws\\S3\\": "src" diff --git a/src/Service/S3/phpunit.xml.dist b/src/Service/S3/phpunit.xml.dist index 9894ce353..20f6abf4c 100644 --- a/src/Service/S3/phpunit.xml.dist +++ b/src/Service/S3/phpunit.xml.dist @@ -1,17 +1,22 @@ - + ./src - + + trigger_deprecation + + @@ -20,4 +25,7 @@ ./tests/ + + + diff --git a/src/Service/Scheduler/.github/workflows/ci.yml b/src/Service/Scheduler/.github/workflows/ci.yml index f8cd96e76..fd44f8c70 100644 --- a/src/Service/Scheduler/.github/workflows/ci.yml +++ b/src/Service/Scheduler/.github/workflows/ci.yml @@ -31,8 +31,7 @@ jobs: - name: Download dependencies run: | composer config minimum-stability dev - composer req symfony/phpunit-bridge --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/src/Service/Scheduler/Makefile b/src/Service/Scheduler/Makefile index 850dffccd..771133a06 100644 --- a/src/Service/Scheduler/Makefile +++ b/src/Service/Scheduler/Makefile @@ -5,7 +5,7 @@ start-docker: echo "Noop" test: initialize - ./vendor/bin/simple-phpunit + ./vendor/bin/phpunit clean: stop-docker stop-docker: diff --git a/src/Service/Scheduler/composer.json b/src/Service/Scheduler/composer.json index 34e6d3adb..d8d461c0f 100644 --- a/src/Service/Scheduler/composer.json +++ b/src/Service/Scheduler/composer.json @@ -17,6 +17,11 @@ "async-aws/core": "^1.9", "symfony/polyfill-uuid": "^1.13.1" }, + "require-dev": { + "phpunit/phpunit": "^11.5.42", + "symfony/error-handler": "^7.3.2 || ^8.0", + "symfony/phpunit-bridge": "^7.3.2 || ^8.0" + }, "autoload": { "psr-4": { "AsyncAws\\Scheduler\\": "src" diff --git a/src/Service/Scheduler/phpunit.xml.dist b/src/Service/Scheduler/phpunit.xml.dist index 9894ce353..20f6abf4c 100644 --- a/src/Service/Scheduler/phpunit.xml.dist +++ b/src/Service/Scheduler/phpunit.xml.dist @@ -1,17 +1,22 @@ - + ./src - + + trigger_deprecation + + @@ -20,4 +25,7 @@ ./tests/ + + + diff --git a/src/Service/SecretsManager/.github/workflows/ci.yml b/src/Service/SecretsManager/.github/workflows/ci.yml index f8cd96e76..fd44f8c70 100644 --- a/src/Service/SecretsManager/.github/workflows/ci.yml +++ b/src/Service/SecretsManager/.github/workflows/ci.yml @@ -31,8 +31,7 @@ jobs: - name: Download dependencies run: | composer config minimum-stability dev - composer req symfony/phpunit-bridge --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/src/Service/SecretsManager/Makefile b/src/Service/SecretsManager/Makefile index 10d5c92ea..7f317600e 100644 --- a/src/Service/SecretsManager/Makefile +++ b/src/Service/SecretsManager/Makefile @@ -9,7 +9,7 @@ start-docker: docker run --rm --link async_aws_localstack-secretsmanager:localstack martin/wait -c localstack:4566 test: initialize - ./vendor/bin/simple-phpunit + ./vendor/bin/phpunit clean: stop-docker stop-docker: diff --git a/src/Service/SecretsManager/composer.json b/src/Service/SecretsManager/composer.json index f86a9aafb..3ae7f2802 100644 --- a/src/Service/SecretsManager/composer.json +++ b/src/Service/SecretsManager/composer.json @@ -17,6 +17,11 @@ "async-aws/core": "^1.9", "symfony/polyfill-uuid": "^1.13.1" }, + "require-dev": { + "phpunit/phpunit": "^11.5.42", + "symfony/error-handler": "^7.3.2 || ^8.0", + "symfony/phpunit-bridge": "^7.3.2 || ^8.0" + }, "autoload": { "psr-4": { "AsyncAws\\SecretsManager\\": "src" diff --git a/src/Service/SecretsManager/phpunit.xml.dist b/src/Service/SecretsManager/phpunit.xml.dist index 9894ce353..20f6abf4c 100644 --- a/src/Service/SecretsManager/phpunit.xml.dist +++ b/src/Service/SecretsManager/phpunit.xml.dist @@ -1,17 +1,22 @@ - + ./src - + + trigger_deprecation + + @@ -20,4 +25,7 @@ ./tests/ + + + diff --git a/src/Service/Ses/.github/workflows/ci.yml b/src/Service/Ses/.github/workflows/ci.yml index f8cd96e76..fd44f8c70 100644 --- a/src/Service/Ses/.github/workflows/ci.yml +++ b/src/Service/Ses/.github/workflows/ci.yml @@ -31,8 +31,7 @@ jobs: - name: Download dependencies run: | composer config minimum-stability dev - composer req symfony/phpunit-bridge --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/src/Service/Ses/Makefile b/src/Service/Ses/Makefile index 850dffccd..771133a06 100644 --- a/src/Service/Ses/Makefile +++ b/src/Service/Ses/Makefile @@ -5,7 +5,7 @@ start-docker: echo "Noop" test: initialize - ./vendor/bin/simple-phpunit + ./vendor/bin/phpunit clean: stop-docker stop-docker: diff --git a/src/Service/Ses/composer.json b/src/Service/Ses/composer.json index 96009b4cc..6170cb503 100644 --- a/src/Service/Ses/composer.json +++ b/src/Service/Ses/composer.json @@ -15,6 +15,11 @@ "ext-json": "*", "async-aws/core": "^1.9" }, + "require-dev": { + "phpunit/phpunit": "^11.5.42", + "symfony/error-handler": "^7.3.2 || ^8.0", + "symfony/phpunit-bridge": "^7.3.2 || ^8.0" + }, "autoload": { "psr-4": { "AsyncAws\\Ses\\": "src" diff --git a/src/Service/Ses/phpunit.xml.dist b/src/Service/Ses/phpunit.xml.dist index 9894ce353..20f6abf4c 100644 --- a/src/Service/Ses/phpunit.xml.dist +++ b/src/Service/Ses/phpunit.xml.dist @@ -1,17 +1,22 @@ - + ./src - + + trigger_deprecation + + @@ -20,4 +25,7 @@ ./tests/ + + + diff --git a/src/Service/Sns/.github/workflows/ci.yml b/src/Service/Sns/.github/workflows/ci.yml index f8cd96e76..fd44f8c70 100644 --- a/src/Service/Sns/.github/workflows/ci.yml +++ b/src/Service/Sns/.github/workflows/ci.yml @@ -31,8 +31,7 @@ jobs: - name: Download dependencies run: | composer config minimum-stability dev - composer req symfony/phpunit-bridge --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/src/Service/Sns/Makefile b/src/Service/Sns/Makefile index 73228fe24..752fe8250 100644 --- a/src/Service/Sns/Makefile +++ b/src/Service/Sns/Makefile @@ -9,7 +9,7 @@ start-docker: docker run --rm --link async_aws_localstack-sns:localstack martin/wait -c localstack:4566 test: initialize - ./vendor/bin/simple-phpunit + ./vendor/bin/phpunit clean: stop-docker stop-docker: diff --git a/src/Service/Sns/composer.json b/src/Service/Sns/composer.json index 62f4a31db..57f0d570e 100644 --- a/src/Service/Sns/composer.json +++ b/src/Service/Sns/composer.json @@ -16,6 +16,11 @@ "ext-simplexml": "*", "async-aws/core": "^1.9" }, + "require-dev": { + "phpunit/phpunit": "^11.5.42", + "symfony/error-handler": "^7.3.2 || ^8.0", + "symfony/phpunit-bridge": "^7.3.2 || ^8.0" + }, "autoload": { "psr-4": { "AsyncAws\\Sns\\": "src" diff --git a/src/Service/Sns/phpunit.xml.dist b/src/Service/Sns/phpunit.xml.dist index 9894ce353..20f6abf4c 100644 --- a/src/Service/Sns/phpunit.xml.dist +++ b/src/Service/Sns/phpunit.xml.dist @@ -1,17 +1,22 @@ - + ./src - + + trigger_deprecation + + @@ -20,4 +25,7 @@ ./tests/ + + + diff --git a/src/Service/Sns/tests/Integration/SnsClientTest.php b/src/Service/Sns/tests/Integration/SnsClientTest.php index a2d885c9e..3cc31f7e3 100644 --- a/src/Service/Sns/tests/Integration/SnsClientTest.php +++ b/src/Service/Sns/tests/Integration/SnsClientTest.php @@ -192,7 +192,7 @@ public function testSubscribe(): void self::assertStringContainsString('arn:aws:sns:us-east-1:000000000000:async-aws:', $result->getSubscriptionArn()); - self::assertCount(1, $client->listSubscriptionsByTopic(['TopicArn' => $this->topicArn])); + self::assertCount(1, iterator_to_array($client->listSubscriptionsByTopic(['TopicArn' => $this->topicArn]))); } public function testUnsubscribe(): void @@ -207,7 +207,7 @@ public function testUnsubscribe(): void ]); $result->resolve(); - self::assertCount(1, $client->listSubscriptionsByTopic(['TopicArn' => $this->topicArn])); + self::assertCount(1, iterator_to_array($client->listSubscriptionsByTopic(['TopicArn' => $this->topicArn]))); $input = new UnsubscribeInput([ 'SubscriptionArn' => $result->getSubscriptionArn(), @@ -215,7 +215,7 @@ public function testUnsubscribe(): void $result = $client->Unsubscribe($input); $result->resolve(); - self::assertCount(0, $client->listSubscriptionsByTopic(['TopicArn' => $this->topicArn])); + self::assertCount(0, iterator_to_array($client->listSubscriptionsByTopic(['TopicArn' => $this->topicArn]))); } private function getClient(): SnsClient diff --git a/src/Service/Sqs/.github/workflows/ci.yml b/src/Service/Sqs/.github/workflows/ci.yml index f8cd96e76..fd44f8c70 100644 --- a/src/Service/Sqs/.github/workflows/ci.yml +++ b/src/Service/Sqs/.github/workflows/ci.yml @@ -31,8 +31,7 @@ jobs: - name: Download dependencies run: | composer config minimum-stability dev - composer req symfony/phpunit-bridge --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/src/Service/Sqs/Makefile b/src/Service/Sqs/Makefile index 2658740ef..04baa2145 100644 --- a/src/Service/Sqs/Makefile +++ b/src/Service/Sqs/Makefile @@ -7,7 +7,7 @@ start-docker: docker run -d -p 9494:9494 --name async_aws_sqs asyncaws/testing-sqs test: initialize - ./vendor/bin/simple-phpunit + ./vendor/bin/phpunit clean: stop-docker stop-docker: diff --git a/src/Service/Sqs/composer.json b/src/Service/Sqs/composer.json index cf03e64bb..b44ce4e11 100644 --- a/src/Service/Sqs/composer.json +++ b/src/Service/Sqs/composer.json @@ -16,6 +16,11 @@ "ext-json": "*", "async-aws/core": "^1.9" }, + "require-dev": { + "phpunit/phpunit": "^11.5.42", + "symfony/error-handler": "^7.3.2 || ^8.0", + "symfony/phpunit-bridge": "^7.3.2 || ^8.0" + }, "autoload": { "psr-4": { "AsyncAws\\Sqs\\": "src" diff --git a/src/Service/Sqs/phpunit.xml.dist b/src/Service/Sqs/phpunit.xml.dist index 9894ce353..20f6abf4c 100644 --- a/src/Service/Sqs/phpunit.xml.dist +++ b/src/Service/Sqs/phpunit.xml.dist @@ -1,17 +1,22 @@ - + ./src - + + trigger_deprecation + + @@ -20,4 +25,7 @@ ./tests/ + + + diff --git a/src/Service/Ssm/.github/workflows/ci.yml b/src/Service/Ssm/.github/workflows/ci.yml index f8cd96e76..fd44f8c70 100644 --- a/src/Service/Ssm/.github/workflows/ci.yml +++ b/src/Service/Ssm/.github/workflows/ci.yml @@ -31,8 +31,7 @@ jobs: - name: Download dependencies run: | composer config minimum-stability dev - composer req symfony/phpunit-bridge --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/src/Service/Ssm/Makefile b/src/Service/Ssm/Makefile index 9684470c4..66d95e0de 100644 --- a/src/Service/Ssm/Makefile +++ b/src/Service/Ssm/Makefile @@ -9,7 +9,7 @@ start-docker: docker run --rm --link async_aws_localstack-ssm:localstack martin/wait -c localstack:4566 test: initialize - ./vendor/bin/simple-phpunit + ./vendor/bin/phpunit clean: stop-docker stop-docker: diff --git a/src/Service/Ssm/composer.json b/src/Service/Ssm/composer.json index dbf32348f..42aad99bc 100644 --- a/src/Service/Ssm/composer.json +++ b/src/Service/Ssm/composer.json @@ -15,6 +15,11 @@ "ext-json": "*", "async-aws/core": "^1.9" }, + "require-dev": { + "phpunit/phpunit": "^11.5.42", + "symfony/error-handler": "^7.3.2 || ^8.0", + "symfony/phpunit-bridge": "^7.3.2 || ^8.0" + }, "conflict": { "symfony/http-client": "<4.4.16 <5.1.7" }, diff --git a/src/Service/Ssm/phpunit.xml.dist b/src/Service/Ssm/phpunit.xml.dist index 9894ce353..20f6abf4c 100644 --- a/src/Service/Ssm/phpunit.xml.dist +++ b/src/Service/Ssm/phpunit.xml.dist @@ -1,17 +1,22 @@ - + ./src - + + trigger_deprecation + + @@ -20,4 +25,7 @@ ./tests/ + + + diff --git a/src/Service/Sso/.github/workflows/ci.yml b/src/Service/Sso/.github/workflows/ci.yml index f8cd96e76..fd44f8c70 100644 --- a/src/Service/Sso/.github/workflows/ci.yml +++ b/src/Service/Sso/.github/workflows/ci.yml @@ -31,8 +31,7 @@ jobs: - name: Download dependencies run: | composer config minimum-stability dev - composer req symfony/phpunit-bridge --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/src/Service/Sso/Makefile b/src/Service/Sso/Makefile index 850dffccd..771133a06 100644 --- a/src/Service/Sso/Makefile +++ b/src/Service/Sso/Makefile @@ -5,7 +5,7 @@ start-docker: echo "Noop" test: initialize - ./vendor/bin/simple-phpunit + ./vendor/bin/phpunit clean: stop-docker stop-docker: diff --git a/src/Service/Sso/composer.json b/src/Service/Sso/composer.json index ec7135579..3d98f239d 100644 --- a/src/Service/Sso/composer.json +++ b/src/Service/Sso/composer.json @@ -14,6 +14,11 @@ "php": "^8.2", "async-aws/core": "^1.9" }, + "require-dev": { + "phpunit/phpunit": "^11.5.42", + "symfony/error-handler": "^7.3.2 || ^8.0", + "symfony/phpunit-bridge": "^7.3.2 || ^8.0" + }, "autoload": { "psr-4": { "AsyncAws\\Sso\\": "src" diff --git a/src/Service/Sso/phpunit.xml.dist b/src/Service/Sso/phpunit.xml.dist index 9894ce353..20f6abf4c 100644 --- a/src/Service/Sso/phpunit.xml.dist +++ b/src/Service/Sso/phpunit.xml.dist @@ -1,17 +1,22 @@ - + ./src - + + trigger_deprecation + + @@ -20,4 +25,7 @@ ./tests/ + + + diff --git a/src/Service/SsoOidc/.github/workflows/ci.yml b/src/Service/SsoOidc/.github/workflows/ci.yml index f8cd96e76..fd44f8c70 100644 --- a/src/Service/SsoOidc/.github/workflows/ci.yml +++ b/src/Service/SsoOidc/.github/workflows/ci.yml @@ -31,8 +31,7 @@ jobs: - name: Download dependencies run: | composer config minimum-stability dev - composer req symfony/phpunit-bridge --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/src/Service/SsoOidc/Makefile b/src/Service/SsoOidc/Makefile index 850dffccd..771133a06 100644 --- a/src/Service/SsoOidc/Makefile +++ b/src/Service/SsoOidc/Makefile @@ -5,7 +5,7 @@ start-docker: echo "Noop" test: initialize - ./vendor/bin/simple-phpunit + ./vendor/bin/phpunit clean: stop-docker stop-docker: diff --git a/src/Service/SsoOidc/composer.json b/src/Service/SsoOidc/composer.json index b08769474..5fd571e40 100644 --- a/src/Service/SsoOidc/composer.json +++ b/src/Service/SsoOidc/composer.json @@ -15,6 +15,11 @@ "ext-json": "*", "async-aws/core": "^1.9" }, + "require-dev": { + "phpunit/phpunit": "^11.5.42", + "symfony/error-handler": "^7.3.2 || ^8.0", + "symfony/phpunit-bridge": "^7.3.2 || ^8.0" + }, "autoload": { "psr-4": { "AsyncAws\\SsoOidc\\": "src" diff --git a/src/Service/SsoOidc/phpunit.xml.dist b/src/Service/SsoOidc/phpunit.xml.dist index 9894ce353..20f6abf4c 100644 --- a/src/Service/SsoOidc/phpunit.xml.dist +++ b/src/Service/SsoOidc/phpunit.xml.dist @@ -1,17 +1,22 @@ - + ./src - + + trigger_deprecation + + @@ -20,4 +25,7 @@ ./tests/ + + + diff --git a/src/Service/StepFunctions/.github/workflows/ci.yml b/src/Service/StepFunctions/.github/workflows/ci.yml index f8cd96e76..fd44f8c70 100644 --- a/src/Service/StepFunctions/.github/workflows/ci.yml +++ b/src/Service/StepFunctions/.github/workflows/ci.yml @@ -31,8 +31,7 @@ jobs: - name: Download dependencies run: | composer config minimum-stability dev - composer req symfony/phpunit-bridge --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/src/Service/StepFunctions/Makefile b/src/Service/StepFunctions/Makefile index 850dffccd..771133a06 100644 --- a/src/Service/StepFunctions/Makefile +++ b/src/Service/StepFunctions/Makefile @@ -5,7 +5,7 @@ start-docker: echo "Noop" test: initialize - ./vendor/bin/simple-phpunit + ./vendor/bin/phpunit clean: stop-docker stop-docker: diff --git a/src/Service/StepFunctions/composer.json b/src/Service/StepFunctions/composer.json index 91ff27fd0..ce12c9e65 100644 --- a/src/Service/StepFunctions/composer.json +++ b/src/Service/StepFunctions/composer.json @@ -15,6 +15,11 @@ "ext-json": "*", "async-aws/core": "^1.9" }, + "require-dev": { + "phpunit/phpunit": "^11.5.42", + "symfony/error-handler": "^7.3.2 || ^8.0", + "symfony/phpunit-bridge": "^7.3.2 || ^8.0" + }, "autoload": { "psr-4": { "AsyncAws\\StepFunctions\\": "src" diff --git a/src/Service/StepFunctions/phpunit.xml.dist b/src/Service/StepFunctions/phpunit.xml.dist index 9894ce353..20f6abf4c 100644 --- a/src/Service/StepFunctions/phpunit.xml.dist +++ b/src/Service/StepFunctions/phpunit.xml.dist @@ -1,17 +1,22 @@ - + ./src - + + trigger_deprecation + + @@ -20,4 +25,7 @@ ./tests/ + + + diff --git a/src/Service/TimestreamQuery/.github/workflows/ci.yml b/src/Service/TimestreamQuery/.github/workflows/ci.yml index f8cd96e76..fd44f8c70 100644 --- a/src/Service/TimestreamQuery/.github/workflows/ci.yml +++ b/src/Service/TimestreamQuery/.github/workflows/ci.yml @@ -31,8 +31,7 @@ jobs: - name: Download dependencies run: | composer config minimum-stability dev - composer req symfony/phpunit-bridge --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/src/Service/TimestreamQuery/Makefile b/src/Service/TimestreamQuery/Makefile index 850dffccd..771133a06 100644 --- a/src/Service/TimestreamQuery/Makefile +++ b/src/Service/TimestreamQuery/Makefile @@ -5,7 +5,7 @@ start-docker: echo "Noop" test: initialize - ./vendor/bin/simple-phpunit + ./vendor/bin/phpunit clean: stop-docker stop-docker: diff --git a/src/Service/TimestreamQuery/composer.json b/src/Service/TimestreamQuery/composer.json index f0169ce8b..0eceeb09b 100644 --- a/src/Service/TimestreamQuery/composer.json +++ b/src/Service/TimestreamQuery/composer.json @@ -17,6 +17,11 @@ "async-aws/core": "^1.16", "symfony/polyfill-uuid": "^1.13.1" }, + "require-dev": { + "phpunit/phpunit": "^11.5.42", + "symfony/error-handler": "^7.3.2 || ^8.0", + "symfony/phpunit-bridge": "^7.3.2 || ^8.0" + }, "autoload": { "psr-4": { "AsyncAws\\TimestreamQuery\\": "src" diff --git a/src/Service/TimestreamQuery/phpunit.xml.dist b/src/Service/TimestreamQuery/phpunit.xml.dist index 9894ce353..20f6abf4c 100644 --- a/src/Service/TimestreamQuery/phpunit.xml.dist +++ b/src/Service/TimestreamQuery/phpunit.xml.dist @@ -1,17 +1,22 @@ - + ./src - + + trigger_deprecation + + @@ -20,4 +25,7 @@ ./tests/ + + + diff --git a/src/Service/TimestreamWrite/.github/workflows/ci.yml b/src/Service/TimestreamWrite/.github/workflows/ci.yml index f8cd96e76..fd44f8c70 100644 --- a/src/Service/TimestreamWrite/.github/workflows/ci.yml +++ b/src/Service/TimestreamWrite/.github/workflows/ci.yml @@ -31,8 +31,7 @@ jobs: - name: Download dependencies run: | composer config minimum-stability dev - composer req symfony/phpunit-bridge --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/src/Service/TimestreamWrite/Makefile b/src/Service/TimestreamWrite/Makefile index 850dffccd..771133a06 100644 --- a/src/Service/TimestreamWrite/Makefile +++ b/src/Service/TimestreamWrite/Makefile @@ -5,7 +5,7 @@ start-docker: echo "Noop" test: initialize - ./vendor/bin/simple-phpunit + ./vendor/bin/phpunit clean: stop-docker stop-docker: diff --git a/src/Service/TimestreamWrite/composer.json b/src/Service/TimestreamWrite/composer.json index 090d70293..2d8306296 100644 --- a/src/Service/TimestreamWrite/composer.json +++ b/src/Service/TimestreamWrite/composer.json @@ -15,6 +15,11 @@ "ext-json": "*", "async-aws/core": "^1.16" }, + "require-dev": { + "phpunit/phpunit": "^11.5.42", + "symfony/error-handler": "^7.3.2 || ^8.0", + "symfony/phpunit-bridge": "^7.3.2 || ^8.0" + }, "autoload": { "psr-4": { "AsyncAws\\TimestreamWrite\\": "src" diff --git a/src/Service/TimestreamWrite/phpunit.xml.dist b/src/Service/TimestreamWrite/phpunit.xml.dist index 9894ce353..20f6abf4c 100644 --- a/src/Service/TimestreamWrite/phpunit.xml.dist +++ b/src/Service/TimestreamWrite/phpunit.xml.dist @@ -1,17 +1,22 @@ - + ./src - + + trigger_deprecation + + @@ -20,4 +25,7 @@ ./tests/ + + + diff --git a/src/Service/Translate/.github/workflows/ci.yml b/src/Service/Translate/.github/workflows/ci.yml index f8cd96e76..fd44f8c70 100644 --- a/src/Service/Translate/.github/workflows/ci.yml +++ b/src/Service/Translate/.github/workflows/ci.yml @@ -31,8 +31,7 @@ jobs: - name: Download dependencies run: | composer config minimum-stability dev - composer req symfony/phpunit-bridge --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/src/Service/Translate/Makefile b/src/Service/Translate/Makefile index 850dffccd..771133a06 100644 --- a/src/Service/Translate/Makefile +++ b/src/Service/Translate/Makefile @@ -5,7 +5,7 @@ start-docker: echo "Noop" test: initialize - ./vendor/bin/simple-phpunit + ./vendor/bin/phpunit clean: stop-docker stop-docker: diff --git a/src/Service/Translate/composer.json b/src/Service/Translate/composer.json index 17f61b7e8..88eff991d 100644 --- a/src/Service/Translate/composer.json +++ b/src/Service/Translate/composer.json @@ -15,6 +15,11 @@ "ext-json": "*", "async-aws/core": "^1.9" }, + "require-dev": { + "phpunit/phpunit": "^11.5.42", + "symfony/error-handler": "^7.3.2 || ^8.0", + "symfony/phpunit-bridge": "^7.3.2 || ^8.0" + }, "autoload": { "psr-4": { "AsyncAws\\Translate\\": "src" diff --git a/src/Service/Translate/phpunit.xml.dist b/src/Service/Translate/phpunit.xml.dist index 9894ce353..20f6abf4c 100644 --- a/src/Service/Translate/phpunit.xml.dist +++ b/src/Service/Translate/phpunit.xml.dist @@ -1,17 +1,22 @@ - + ./src - + + trigger_deprecation + + @@ -20,4 +25,7 @@ ./tests/ + + + diff --git a/src/Service/XRay/.github/workflows/ci.yml b/src/Service/XRay/.github/workflows/ci.yml index f8cd96e76..fd44f8c70 100644 --- a/src/Service/XRay/.github/workflows/ci.yml +++ b/src/Service/XRay/.github/workflows/ci.yml @@ -31,8 +31,7 @@ jobs: - name: Download dependencies run: | composer config minimum-stability dev - composer req symfony/phpunit-bridge --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/src/Service/XRay/Makefile b/src/Service/XRay/Makefile index 850dffccd..771133a06 100644 --- a/src/Service/XRay/Makefile +++ b/src/Service/XRay/Makefile @@ -5,7 +5,7 @@ start-docker: echo "Noop" test: initialize - ./vendor/bin/simple-phpunit + ./vendor/bin/phpunit clean: stop-docker stop-docker: diff --git a/src/Service/XRay/composer.json b/src/Service/XRay/composer.json index 6aec5280c..0a5f5fb70 100644 --- a/src/Service/XRay/composer.json +++ b/src/Service/XRay/composer.json @@ -15,6 +15,11 @@ "ext-json": "*", "async-aws/core": "^1.9" }, + "require-dev": { + "phpunit/phpunit": "^11.5.42", + "symfony/error-handler": "^7.3.2 || ^8.0", + "symfony/phpunit-bridge": "^7.3.2 || ^8.0" + }, "autoload": { "psr-4": { "AsyncAws\\XRay\\": "src" diff --git a/src/Service/XRay/phpunit.xml.dist b/src/Service/XRay/phpunit.xml.dist index 9894ce353..20f6abf4c 100644 --- a/src/Service/XRay/phpunit.xml.dist +++ b/src/Service/XRay/phpunit.xml.dist @@ -1,17 +1,22 @@ - + ./src - + + trigger_deprecation + + @@ -20,4 +25,7 @@ ./tests/ + + + diff --git a/tests/Unit/BranchAliasTest.php b/tests/Unit/BranchAliasTest.php index 0ff342f57..2d3f81bf1 100644 --- a/tests/Unit/BranchAliasTest.php +++ b/tests/Unit/BranchAliasTest.php @@ -4,6 +4,7 @@ namespace AsyncAws\Test\Unit; +use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\TestCase; use Symfony\Component\Finder\Finder; @@ -21,9 +22,7 @@ */ class BranchAliasTest extends TestCase { - /** - * @dataProvider provideChangedlogFiles - */ + #[DataProvider('provideChangedlogFiles')] public function testBranchAliasValue(string $changelogPath) { $composerPath = \dirname($changelogPath) . '/composer.json'; diff --git a/tests/Unit/ChangelogTest.php b/tests/Unit/ChangelogTest.php index 369846e92..378540e69 100644 --- a/tests/Unit/ChangelogTest.php +++ b/tests/Unit/ChangelogTest.php @@ -4,6 +4,7 @@ namespace AsyncAws\Test\Unit; +use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\TestCase; use Symfony\Component\Finder\Finder; @@ -12,9 +13,7 @@ */ class ChangelogTest extends TestCase { - /** - * @dataProvider provideChangedlogFiles - */ + #[DataProvider('provideChangedlogFiles')] public function testChangelogFormat(string $changelogPath) { $lines = explode("\n", file_get_contents($changelogPath)); @@ -131,9 +130,7 @@ public function testChangelogFormat(string $changelogPath) self::assertTrue($finalWords, 'CHANGELOG MUST contains "First version"'); } - /** - * @dataProvider provideChangedServicesWithoutChangelog - */ + #[DataProvider('provideChangedServicesWithoutChangelog')] public function testChangelogEntryForService(string $service, string $base, $isCommentOnly) { if (!$isCommentOnly) {