From 829bef834a1cb67968f5882a9efb34a081a5ee6f Mon Sep 17 00:00:00 2001 From: Dawid Parafinski Date: Thu, 17 Sep 2026 17:32:43 +0200 Subject: [PATCH 1/3] IBX-12606: Replaced the Symfony deprecation thresholds with PHPUnit's native deprecation gate --- phpunit.baseline.xml | 2 ++ phpunit.integration.baseline.xml | 2 ++ phpunit.integration.xml.dist | 12 ++++++++++-- phpunit.xml.dist | 11 ++++++++++- 4 files changed, 24 insertions(+), 3 deletions(-) create mode 100644 phpunit.baseline.xml create mode 100644 phpunit.integration.baseline.xml diff --git a/phpunit.baseline.xml b/phpunit.baseline.xml new file mode 100644 index 00000000..f33abb62 --- /dev/null +++ b/phpunit.baseline.xml @@ -0,0 +1,2 @@ + + diff --git a/phpunit.integration.baseline.xml b/phpunit.integration.baseline.xml new file mode 100644 index 00000000..f33abb62 --- /dev/null +++ b/phpunit.integration.baseline.xml @@ -0,0 +1,2 @@ + + diff --git a/phpunit.integration.xml.dist b/phpunit.integration.xml.dist index 3e796c18..5ea2215b 100644 --- a/phpunit.integration.xml.dist +++ b/phpunit.integration.xml.dist @@ -4,14 +4,22 @@ bootstrap="tests/bootstrap.php" beStrictAboutOutputDuringTests="true" failOnWarning="true" - cacheDirectory=".phpunit.cache"> + cacheDirectory=".phpunit.cache" + displayDetailsOnTestsThatTriggerDeprecations="true" + failOnDeprecation="true"> - tests/integration + + + src/lib + src/bundle + src/contracts + + diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 1e37cc32..45a9ce8e 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -5,7 +5,9 @@ bootstrap="./bootstrap.php" colors="true" cacheDirectory=".phpunit.cache" - beStrictAboutTestsThatDoNotTestAnything="false"> + beStrictAboutTestsThatDoNotTestAnything="false" + displayDetailsOnTestsThatTriggerDeprecations="true" + failOnDeprecation="true"> @@ -17,4 +19,11 @@ ./tests/bundle + + + src/lib + src/bundle + src/contracts + + From 252f117e49070914abc4c1f044fcb6a9e79354cc Mon Sep 17 00:00:00 2001 From: Dawid Parafinski Date: Fri, 18 Sep 2026 15:48:03 +0200 Subject: [PATCH 2/3] IBX-12606: Failed test runs on PHP notices and warnings to keep the PHPUnit 9 convert*ToExceptions strictness --- phpunit.integration.xml.dist | 1 + phpunit.xml.dist | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/phpunit.integration.xml.dist b/phpunit.integration.xml.dist index 5ea2215b..3cf63042 100644 --- a/phpunit.integration.xml.dist +++ b/phpunit.integration.xml.dist @@ -4,6 +4,7 @@ bootstrap="tests/bootstrap.php" beStrictAboutOutputDuringTests="true" failOnWarning="true" + failOnNotice="true" cacheDirectory=".phpunit.cache" displayDetailsOnTestsThatTriggerDeprecations="true" failOnDeprecation="true"> diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 45a9ce8e..f70bb2b6 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -7,7 +7,9 @@ cacheDirectory=".phpunit.cache" beStrictAboutTestsThatDoNotTestAnything="false" displayDetailsOnTestsThatTriggerDeprecations="true" - failOnDeprecation="true"> + failOnDeprecation="true" + failOnWarning="true" + failOnNotice="true"> From 4dc120904e23cb3a2772d76e1863771341ffa962 Mon Sep 17 00:00:00 2001 From: Dawid Parafinski Date: Mon, 21 Sep 2026 16:29:29 +0200 Subject: [PATCH 3/3] IBX-12606: Added symfony/runtime to require-dev so the deprecation gate actually fires FrameworkBundle::boot() calls ErrorHandler::register(null, false) whenever Symfony\Component\Runtime\SymfonyRuntime does not exist, permanently installing Symfony's ErrorHandler the first time the integration kernel boots in tests/bootstrap.php - before PHPUnit\Runner\ErrorHandler::enable() ever runs. Because that call is per-test and backs out silently whenever a foreign handler is already registered, failOnDeprecation never actually triggered for any deprecation raised during test execution. Requiring symfony/runtime makes FrameworkBundle::boot() call get_error_handler() instead, leaving no handler installed after kernel boot, so PHPUnit can register its own. Verified with a temporary trigger_error() probe in TranslationTest::setUp(): swallowed (exit 0) before this change, caught and failing the build (exit 1, Deprecations: 1) after. --- composer.json | 1 + 1 file changed, 1 insertion(+) diff --git a/composer.json b/composer.json index ac53d17f..8ef352cb 100644 --- a/composer.json +++ b/composer.json @@ -39,6 +39,7 @@ "phpstan/phpstan-phpunit": "^2.0", "phpstan/phpstan-symfony": "^2.0", "phpunit/phpunit": "^11.5", + "symfony/runtime": "^7.4", "webmozart/assert": "^2.3" }, "autoload": {