From 883a2eeb3e98844ad7b70b9719f2aa8f16c09ee7 Mon Sep 17 00:00:00 2001 From: Jeremy Mikola Date: Tue, 24 Sep 2024 10:37:04 -0400 Subject: [PATCH 1/3] Retry once when disabling fail points (#1445) The previous refactor in 90dcf186c8664a2cdd57314122d46b16234555c2 changed when we disable fail points. ManagesFailPointTrait now does so immediately after test operations are run instead of during tear down, so we may be hitting a point where the server stream was disconnected and libmongoc is not recovering (possibly related to CDRIVER-4532). Adding an extra retry attempt seems to overcome this. --- tests/UnifiedSpecTests/ManagesFailPointsTrait.php | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/tests/UnifiedSpecTests/ManagesFailPointsTrait.php b/tests/UnifiedSpecTests/ManagesFailPointsTrait.php index d88368fa9..1fbe0fd6a 100644 --- a/tests/UnifiedSpecTests/ManagesFailPointsTrait.php +++ b/tests/UnifiedSpecTests/ManagesFailPointsTrait.php @@ -2,6 +2,7 @@ namespace MongoDB\Tests\UnifiedSpecTests; +use MongoDB\Driver\Exception\ConnectionException; use MongoDB\Driver\Server; use MongoDB\Operation\DatabaseCommand; use stdClass; @@ -31,8 +32,14 @@ public function configureFailPoint(stdClass $failPoint, Server $server): void public function disableFailPoints(): void { foreach ($this->failPointsAndServers as [$failPoint, $server]) { - $operation = new DatabaseCommand('admin', ['configureFailPoint' => $failPoint, 'mode' => 'off']); - $operation->execute($server); + try { + $operation = new DatabaseCommand('admin', ['configureFailPoint' => $failPoint, 'mode' => 'off']); + $operation->execute($server); + } catch (ConnectionException $e) { + // Retry once in case the connection was dropped by the last operation + $operation = new DatabaseCommand('admin', ['configureFailPoint' => $failPoint, 'mode' => 'off']); + $operation->execute($server); + } } $this->failPointsAndServers = []; From 763396286d60ec3a0c5514ece8d80e3eb649fa1c Mon Sep 17 00:00:00 2001 From: Andreas Braun Date: Tue, 24 Sep 2024 18:10:10 +0200 Subject: [PATCH 2/3] Test with ext-mongodb 1.20 (#1449) --- .evergreen/config.yml | 2 + .evergreen/config/generate-config.php | 5 +- .../generated/build/build-extension.yml | 300 ++++++++---------- .../config/generated/test-variant/lowest.yml | 16 + .../config/generated/test-variant/phpc.yml | 42 +++ .../templates/build/build-extension.yml | 60 ++-- .github/workflows/coding-standards.yml | 4 +- .github/workflows/static-analysis.yml | 4 +- .github/workflows/tests.yml | 4 +- 9 files changed, 233 insertions(+), 204 deletions(-) create mode 100644 .evergreen/config/generated/test-variant/lowest.yml create mode 100644 .evergreen/config/generated/test-variant/phpc.yml diff --git a/.evergreen/config.yml b/.evergreen/config.yml index 2843ac813..aede36c7e 100644 --- a/.evergreen/config.yml +++ b/.evergreen/config.yml @@ -72,3 +72,5 @@ include: - filename: .evergreen/config/generated/test/csfle.yml - filename: .evergreen/config/generated/test-variant/modern-php-full.yml - filename: .evergreen/config/generated/test-variant/legacy-php-full.yml + - filename: .evergreen/config/generated/test-variant/phpc.yml + - filename: .evergreen/config/generated/test-variant/lowest.yml diff --git a/.evergreen/config/generate-config.php b/.evergreen/config/generate-config.php index a87d262f7..b87051571 100644 --- a/.evergreen/config/generate-config.php +++ b/.evergreen/config/generate-config.php @@ -61,9 +61,8 @@ // Test variants $allFiles[] = generateConfigs('buildvariants', 'test-variant', 'phpVersion', 'modern-php-full.yml', $modernPhpVersions); $allFiles[] = generateConfigs('buildvariants', 'test-variant', 'phpVersion', 'legacy-php-full.yml', $legacyPhpVersions); -// TODO: Re-enable when 1.20.0 is released -// $allFiles[] = generateConfigs('buildvariants', 'test-variant', 'phpVersion', 'phpc.yml', [$latestPhpVersion]); -// $allFiles[] = generateConfigs('buildvariants', 'test-variant', 'phpVersion', 'lowest.yml', [$lowestPhpVersion]); +$allFiles[] = generateConfigs('buildvariants', 'test-variant', 'phpVersion', 'phpc.yml', [$latestPhpVersion]); +$allFiles[] = generateConfigs('buildvariants', 'test-variant', 'phpVersion', 'lowest.yml', [$lowestPhpVersion]); echo "Generated config. Use the following list to import files:\n"; echo implode("\n", array_map('getImportConfig', $allFiles)) . "\n"; diff --git a/.evergreen/config/generated/build/build-extension.yml b/.evergreen/config/generated/build/build-extension.yml index 4faf2d114..54c2b2a2a 100644 --- a/.evergreen/config/generated/build/build-extension.yml +++ b/.evergreen/config/generated/build/build-extension.yml @@ -7,41 +7,37 @@ tasks: vars: PHP_VERSION: "8.3" - func: "compile extension" - # TODO: remove once 1.20.0 is released + - func: "upload extension" + - name: "build-php-8.3-lowest" + tags: ["build", "php8.3", "lowest", "pr", "tag"] + commands: + - func: "locate PHP binaries" + vars: + PHP_VERSION: "8.3" + - func: "compile extension" + vars: + EXTENSION_VERSION: "1.20.0" + - func: "upload extension" + - name: "build-php-8.3-next-stable" + tags: ["build", "php8.3", "next-stable", "pr", "tag"] + commands: + - func: "locate PHP binaries" + vars: + PHP_VERSION: "8.3" + - func: "compile extension" vars: EXTENSION_BRANCH: "v1.20" - func: "upload extension" - # TODO: re-enable once 1.20.0 is released -# - name: "build-php-8.3-lowest" -# tags: ["build", "php8.3", "lowest", "pr", "tag"] -# commands: -# - func: "locate PHP binaries" -# vars: -# PHP_VERSION: "8.3" -# - func: "compile extension" -# vars: -# EXTENSION_VERSION: "1.20.0" -# - func: "upload extension" -# - name: "build-php-8.3-next-stable" -# tags: ["build", "php8.3", "next-stable", "pr", "tag"] -# commands: -# - func: "locate PHP binaries" -# vars: -# PHP_VERSION: "8.3" -# - func: "compile extension" -# vars: -# EXTENSION_BRANCH: "v1.20.0" -# - func: "upload extension" -# - name: "build-php-8.3-next-minor" -# tags: ["build", "php8.3", "next-minor"] -# commands: -# - func: "locate PHP binaries" -# vars: -# PHP_VERSION: "8.3" -# - func: "compile extension" -# vars: -# EXTENSION_BRANCH: "master" -# - func: "upload extension" + - name: "build-php-8.3-next-minor" + tags: ["build", "php8.3", "next-minor"] + commands: + - func: "locate PHP binaries" + vars: + PHP_VERSION: "8.3" + - func: "compile extension" + vars: + EXTENSION_BRANCH: "v1.x" + - func: "upload extension" - name: "build-php-8.2" tags: ["build", "php8.2", "stable", "pr", "tag"] commands: @@ -49,41 +45,37 @@ tasks: vars: PHP_VERSION: "8.2" - func: "compile extension" - # TODO: remove once 1.20.0 is released + - func: "upload extension" + - name: "build-php-8.2-lowest" + tags: ["build", "php8.2", "lowest", "pr", "tag"] + commands: + - func: "locate PHP binaries" + vars: + PHP_VERSION: "8.2" + - func: "compile extension" + vars: + EXTENSION_VERSION: "1.20.0" + - func: "upload extension" + - name: "build-php-8.2-next-stable" + tags: ["build", "php8.2", "next-stable", "pr", "tag"] + commands: + - func: "locate PHP binaries" + vars: + PHP_VERSION: "8.2" + - func: "compile extension" vars: EXTENSION_BRANCH: "v1.20" - func: "upload extension" - # TODO: re-enable once 1.20.0 is released -# - name: "build-php-8.2-lowest" -# tags: ["build", "php8.2", "lowest", "pr", "tag"] -# commands: -# - func: "locate PHP binaries" -# vars: -# PHP_VERSION: "8.2" -# - func: "compile extension" -# vars: -# EXTENSION_VERSION: "1.20.0" -# - func: "upload extension" -# - name: "build-php-8.2-next-stable" -# tags: ["build", "php8.2", "next-stable", "pr", "tag"] -# commands: -# - func: "locate PHP binaries" -# vars: -# PHP_VERSION: "8.2" -# - func: "compile extension" -# vars: -# EXTENSION_BRANCH: "v1.20.0" -# - func: "upload extension" -# - name: "build-php-8.2-next-minor" -# tags: ["build", "php8.2", "next-minor"] -# commands: -# - func: "locate PHP binaries" -# vars: -# PHP_VERSION: "8.2" -# - func: "compile extension" -# vars: -# EXTENSION_BRANCH: "master" -# - func: "upload extension" + - name: "build-php-8.2-next-minor" + tags: ["build", "php8.2", "next-minor"] + commands: + - func: "locate PHP binaries" + vars: + PHP_VERSION: "8.2" + - func: "compile extension" + vars: + EXTENSION_BRANCH: "v1.x" + - func: "upload extension" - name: "build-php-8.1" tags: ["build", "php8.1", "stable", "pr", "tag"] commands: @@ -91,41 +83,37 @@ tasks: vars: PHP_VERSION: "8.1" - func: "compile extension" - # TODO: remove once 1.20.0 is released + - func: "upload extension" + - name: "build-php-8.1-lowest" + tags: ["build", "php8.1", "lowest", "pr", "tag"] + commands: + - func: "locate PHP binaries" + vars: + PHP_VERSION: "8.1" + - func: "compile extension" + vars: + EXTENSION_VERSION: "1.20.0" + - func: "upload extension" + - name: "build-php-8.1-next-stable" + tags: ["build", "php8.1", "next-stable", "pr", "tag"] + commands: + - func: "locate PHP binaries" + vars: + PHP_VERSION: "8.1" + - func: "compile extension" vars: EXTENSION_BRANCH: "v1.20" - func: "upload extension" - # TODO: re-enable once 1.20.0 is released -# - name: "build-php-8.1-lowest" -# tags: ["build", "php8.1", "lowest", "pr", "tag"] -# commands: -# - func: "locate PHP binaries" -# vars: -# PHP_VERSION: "8.1" -# - func: "compile extension" -# vars: -# EXTENSION_VERSION: "1.20.0" -# - func: "upload extension" -# - name: "build-php-8.1-next-stable" -# tags: ["build", "php8.1", "next-stable", "pr", "tag"] -# commands: -# - func: "locate PHP binaries" -# vars: -# PHP_VERSION: "8.1" -# - func: "compile extension" -# vars: -# EXTENSION_BRANCH: "v1.20.0" -# - func: "upload extension" -# - name: "build-php-8.1-next-minor" -# tags: ["build", "php8.1", "next-minor"] -# commands: -# - func: "locate PHP binaries" -# vars: -# PHP_VERSION: "8.1" -# - func: "compile extension" -# vars: -# EXTENSION_BRANCH: "master" -# - func: "upload extension" + - name: "build-php-8.1-next-minor" + tags: ["build", "php8.1", "next-minor"] + commands: + - func: "locate PHP binaries" + vars: + PHP_VERSION: "8.1" + - func: "compile extension" + vars: + EXTENSION_BRANCH: "v1.x" + - func: "upload extension" - name: "build-php-8.0" tags: ["build", "php8.0", "stable", "pr", "tag"] commands: @@ -133,41 +121,37 @@ tasks: vars: PHP_VERSION: "8.0" - func: "compile extension" - # TODO: remove once 1.20.0 is released + - func: "upload extension" + - name: "build-php-8.0-lowest" + tags: ["build", "php8.0", "lowest", "pr", "tag"] + commands: + - func: "locate PHP binaries" + vars: + PHP_VERSION: "8.0" + - func: "compile extension" + vars: + EXTENSION_VERSION: "1.20.0" + - func: "upload extension" + - name: "build-php-8.0-next-stable" + tags: ["build", "php8.0", "next-stable", "pr", "tag"] + commands: + - func: "locate PHP binaries" + vars: + PHP_VERSION: "8.0" + - func: "compile extension" vars: EXTENSION_BRANCH: "v1.20" - func: "upload extension" - # TODO: re-enable once 1.20.0 is released -# - name: "build-php-8.0-lowest" -# tags: ["build", "php8.0", "lowest", "pr", "tag"] -# commands: -# - func: "locate PHP binaries" -# vars: -# PHP_VERSION: "8.0" -# - func: "compile extension" -# vars: -# EXTENSION_VERSION: "1.20.0" -# - func: "upload extension" -# - name: "build-php-8.0-next-stable" -# tags: ["build", "php8.0", "next-stable", "pr", "tag"] -# commands: -# - func: "locate PHP binaries" -# vars: -# PHP_VERSION: "8.0" -# - func: "compile extension" -# vars: -# EXTENSION_BRANCH: "v1.20.0" -# - func: "upload extension" -# - name: "build-php-8.0-next-minor" -# tags: ["build", "php8.0", "next-minor"] -# commands: -# - func: "locate PHP binaries" -# vars: -# PHP_VERSION: "8.0" -# - func: "compile extension" -# vars: -# EXTENSION_BRANCH: "master" -# - func: "upload extension" + - name: "build-php-8.0-next-minor" + tags: ["build", "php8.0", "next-minor"] + commands: + - func: "locate PHP binaries" + vars: + PHP_VERSION: "8.0" + - func: "compile extension" + vars: + EXTENSION_BRANCH: "v1.x" + - func: "upload extension" - name: "build-php-7.4" tags: ["build", "php7.4", "stable", "pr", "tag"] commands: @@ -175,38 +159,34 @@ tasks: vars: PHP_VERSION: "7.4" - func: "compile extension" - # TODO: remove once 1.20.0 is released + - func: "upload extension" + - name: "build-php-7.4-lowest" + tags: ["build", "php7.4", "lowest", "pr", "tag"] + commands: + - func: "locate PHP binaries" + vars: + PHP_VERSION: "7.4" + - func: "compile extension" + vars: + EXTENSION_VERSION: "1.20.0" + - func: "upload extension" + - name: "build-php-7.4-next-stable" + tags: ["build", "php7.4", "next-stable", "pr", "tag"] + commands: + - func: "locate PHP binaries" + vars: + PHP_VERSION: "7.4" + - func: "compile extension" vars: EXTENSION_BRANCH: "v1.20" - func: "upload extension" - # TODO: re-enable once 1.20.0 is released -# - name: "build-php-7.4-lowest" -# tags: ["build", "php7.4", "lowest", "pr", "tag"] -# commands: -# - func: "locate PHP binaries" -# vars: -# PHP_VERSION: "7.4" -# - func: "compile extension" -# vars: -# EXTENSION_VERSION: "1.20.0" -# - func: "upload extension" -# - name: "build-php-7.4-next-stable" -# tags: ["build", "php7.4", "next-stable", "pr", "tag"] -# commands: -# - func: "locate PHP binaries" -# vars: -# PHP_VERSION: "7.4" -# - func: "compile extension" -# vars: -# EXTENSION_BRANCH: "v1.20.0" -# - func: "upload extension" -# - name: "build-php-7.4-next-minor" -# tags: ["build", "php7.4", "next-minor"] -# commands: -# - func: "locate PHP binaries" -# vars: -# PHP_VERSION: "7.4" -# - func: "compile extension" -# vars: -# EXTENSION_BRANCH: "master" -# - func: "upload extension" + - name: "build-php-7.4-next-minor" + tags: ["build", "php7.4", "next-minor"] + commands: + - func: "locate PHP binaries" + vars: + PHP_VERSION: "7.4" + - func: "compile extension" + vars: + EXTENSION_BRANCH: "v1.x" + - func: "upload extension" diff --git a/.evergreen/config/generated/test-variant/lowest.yml b/.evergreen/config/generated/test-variant/lowest.yml new file mode 100644 index 000000000..6ed188430 --- /dev/null +++ b/.evergreen/config/generated/test-variant/lowest.yml @@ -0,0 +1,16 @@ +# This file is generated automatically - please edit the "templates/test-variant/lowest.yml" template file instead. +buildvariants: + - name: test-debian92-php-7.4-local-lowest + tags: ["test", "debian", "x64", "php7.4", "pr", "tag"] + display_name: "Test: Debian 9.2, PHP 7.4, Lowest Dependencies" + run_on: debian92-small + expansions: + FETCH_BUILD_VARIANT: "build-debian92" + FETCH_BUILD_TASK: "build-php-7.4-lowest" + PHP_VERSION: "7.4" + DEPENDENCIES: "lowest" + depends_on: + - variant: "build-debian92" + name: "build-php-7.4-lowest" + tasks: + - ".replicaset .local .4.0 !.csfle" diff --git a/.evergreen/config/generated/test-variant/phpc.yml b/.evergreen/config/generated/test-variant/phpc.yml new file mode 100644 index 000000000..e0eb428ce --- /dev/null +++ b/.evergreen/config/generated/test-variant/phpc.yml @@ -0,0 +1,42 @@ +# This file is generated automatically - please edit the "templates/test-variant/phpc.yml" template file instead. +buildvariants: + # Variants with different PHPC versions + - name: test-debian12-php-8.3-phpc-next-stable + tags: ["test", "debian", "x64", "php8.3", "pr", "tag"] + display_name: "Test: Debian 12, PHP 8.3, PHPC next-stable" + run_on: debian12-small + expansions: + FETCH_BUILD_VARIANT: "build-debian12" + FETCH_BUILD_TASK: "build-php-8.3-next-stable" + PHP_VERSION: "8.3" + depends_on: + - variant: "build-debian12" + name: "build-php-8.3-next-stable" + tasks: + - ".standalone .local !.csfle !.4.0 !.4.2 !.4.4 !.5.0 !.6.0" + - ".replicaset .local !.csfle !.4.0 !.4.2 !.4.4 !.5.0 !.6.0" + - ".sharded .local !.csfle !.4.0 !.4.2 !.4.4 !.5.0 !.6.0" + - ".loadbalanced .local !.csfle !.4.0 !.4.2 !.4.4 !.5.0 !.6.0" + - "test_serverless_task_group" + - "test_serverless_proxy_task_group" + - "test-atlas-data-lake" + + - name: test-debian12-php-8.3-phpc-next-minor + tags: ["test", "debian", "x64", "php8.3"] + display_name: "Test: Debian 12, PHP 8.3, PHPC next-minor" + run_on: debian12-small + expansions: + FETCH_BUILD_VARIANT: "build-debian12" + FETCH_BUILD_TASK: "build-php-8.3-next-minor" + PHP_VERSION: "8.3" + depends_on: + - variant: "build-debian12" + name: "build-php-8.3-next-minor" + tasks: + - ".standalone .local !.csfle !.4.0 !.4.2 !.4.4 !.5.0 !.6.0" + - ".replicaset .local !.csfle !.4.0 !.4.2 !.4.4 !.5.0 !.6.0" + - ".sharded .local !.csfle !.4.0 !.4.2 !.4.4 !.5.0 !.6.0" + - ".loadbalanced .local !.csfle !.4.0 !.4.2 !.4.4 !.5.0 !.6.0" + - "test_serverless_task_group" + - "test_serverless_proxy_task_group" + - "test-atlas-data-lake" diff --git a/.evergreen/config/templates/build/build-extension.yml b/.evergreen/config/templates/build/build-extension.yml index ecd1fffdd..869c0a9e4 100644 --- a/.evergreen/config/templates/build/build-extension.yml +++ b/.evergreen/config/templates/build/build-extension.yml @@ -5,38 +5,34 @@ vars: PHP_VERSION: "%phpVersion%" - func: "compile extension" - # TODO: remove once 1.20.0 is released + - func: "upload extension" + - name: "build-php-%phpVersion%-lowest" + tags: ["build", "php%phpVersion%", "lowest", "pr", "tag"] + commands: + - func: "locate PHP binaries" + vars: + PHP_VERSION: "%phpVersion%" + - func: "compile extension" + vars: + EXTENSION_VERSION: "1.20.0" + - func: "upload extension" + - name: "build-php-%phpVersion%-next-stable" + tags: ["build", "php%phpVersion%", "next-stable", "pr", "tag"] + commands: + - func: "locate PHP binaries" + vars: + PHP_VERSION: "%phpVersion%" + - func: "compile extension" vars: EXTENSION_BRANCH: "v1.20" - func: "upload extension" - # TODO: re-enable once 1.20.0 is released -# - name: "build-php-%phpVersion%-lowest" -# tags: ["build", "php%phpVersion%", "lowest", "pr", "tag"] -# commands: -# - func: "locate PHP binaries" -# vars: -# PHP_VERSION: "%phpVersion%" -# - func: "compile extension" -# vars: -# EXTENSION_VERSION: "1.20.0" -# - func: "upload extension" -# - name: "build-php-%phpVersion%-next-stable" -# tags: ["build", "php%phpVersion%", "next-stable", "pr", "tag"] -# commands: -# - func: "locate PHP binaries" -# vars: -# PHP_VERSION: "%phpVersion%" -# - func: "compile extension" -# vars: -# EXTENSION_BRANCH: "v1.20.0" -# - func: "upload extension" -# - name: "build-php-%phpVersion%-next-minor" -# tags: ["build", "php%phpVersion%", "next-minor"] -# commands: -# - func: "locate PHP binaries" -# vars: -# PHP_VERSION: "%phpVersion%" -# - func: "compile extension" -# vars: -# EXTENSION_BRANCH: "master" -# - func: "upload extension" + - name: "build-php-%phpVersion%-next-minor" + tags: ["build", "php%phpVersion%", "next-minor"] + commands: + - func: "locate PHP binaries" + vars: + PHP_VERSION: "%phpVersion%" + - func: "compile extension" + vars: + EXTENSION_BRANCH: "v1.x" + - func: "upload extension" diff --git a/.github/workflows/coding-standards.yml b/.github/workflows/coding-standards.yml index 959e9b500..9fe30fbb0 100644 --- a/.github/workflows/coding-standards.yml +++ b/.github/workflows/coding-standards.yml @@ -15,9 +15,7 @@ on: env: PHP_VERSION: "8.2" - # TODO: change to "stable" once 1.20.0 is released - # DRIVER_VERSION: "stable" - DRIVER_VERSION: "mongodb/mongo-php-driver@v1.20" + DRIVER_VERSION: "stable" jobs: phpcs: diff --git a/.github/workflows/static-analysis.yml b/.github/workflows/static-analysis.yml index 23bdd702e..7a634683b 100644 --- a/.github/workflows/static-analysis.yml +++ b/.github/workflows/static-analysis.yml @@ -21,9 +21,7 @@ on: env: PHP_VERSION: "8.2" - # TODO: change to "stable" once 1.20.0 is released - # DRIVER_VERSION: "stable" - DRIVER_VERSION: "mongodb/mongo-php-driver@v1.20" + DRIVER_VERSION: "stable" jobs: psalm: diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index e5ae92cdc..2ac3b72e4 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -14,9 +14,7 @@ on: - "feature/*" env: - # TODO: change to "stable" once 1.20.0 is released - # DRIVER_VERSION: "stable" - DRIVER_VERSION: "mongodb/mongo-php-driver@v1.20" + DRIVER_VERSION: "stable" jobs: phpunit: From 44a3c7a7a080bba1df0d37560ad60e5bd90e351d Mon Sep 17 00:00:00 2001 From: Andreas Braun Date: Wed, 25 Sep 2024 10:12:44 +0200 Subject: [PATCH 3/3] Assert that the modifiers option is indeed deprecated (#1451) --- tests/Operation/FindFunctionalTest.php | 4 +++- tests/TestCase.php | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/Operation/FindFunctionalTest.php b/tests/Operation/FindFunctionalTest.php index 2b70a421b..cc9720403 100644 --- a/tests/Operation/FindFunctionalTest.php +++ b/tests/Operation/FindFunctionalTest.php @@ -48,7 +48,9 @@ function () use ($modifiers): void { ['modifiers' => $modifiers], ); - $operation->execute($this->getPrimaryServer()); + $this->assertDeprecated( + fn () => $operation->execute($this->getPrimaryServer()), + ); }, function (array $event) use ($expectedSort): void { $this->assertEquals($expectedSort, $event['started']->getCommand()->sort ?? null); diff --git a/tests/TestCase.php b/tests/TestCase.php index b037c2908..87a951eed 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -36,6 +36,7 @@ use function sprintf; use function strtr; +use const E_DEPRECATED; use const E_USER_DEPRECATED; abstract class TestCase extends BaseTestCase @@ -171,7 +172,7 @@ protected function assertDeprecated(callable $execution): void set_error_handler(function ($errno, $errstr) use (&$errors): void { $errors[] = $errstr; - }, E_USER_DEPRECATED); + }, E_USER_DEPRECATED | E_DEPRECATED); try { call_user_func($execution);