IBX-12606: Replaced the Symfony deprecation thresholds with PHPUnit's native deprecation gate - #354
Merged
Merged
Conversation
ViniTou
force-pushed
the
phpunit-11-deprecation-gate
branch
4 times, most recently
from
September 18, 2026 10:50
55ad2e7 to
adb6d5d
Compare
… native deprecation gate
ViniTou
force-pushed
the
phpunit-11-deprecation-gate
branch
from
September 18, 2026 14:09
adb6d5d to
d3799bc
Compare
|
barw4
approved these changes
Sep 23, 2026
konradoboza
approved these changes
Sep 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Description:
SYMFONY_DEPRECATIONS_HELPERthresholds are dead under PHPUnit >=10: phpunit-bridge no longer registers aDeprecationErrorHandler, sotrigger_deprecation()calls were silently ignored. This replaces it with PHPUnit 11's native gate:failOnDeprecation+ a per-config<source baseline="...">scoped tosrc/lib,src/contractsandsrc/bundle, so CI fails only on NEW deprecations.phpunit.xmlandphpunit-integration.xmlare gated.phpunit.xml's baseline carries 2 issues (bothLeague\Flysystem\Local\LocalFilesystemAdapter::__construct()implicit-nullable-parameter deprecations, PHP 8.4-only);phpunit-integration.xml's baseline is empty: 0 issues — no pre-existing src-level deprecations.phpunit-integration-legacy.xmlandphpunit-integration-legacy-solr.xmlare left ungated: neither had aSYMFONY_DEPRECATIONS_HELPERline to remove. The legacy suite now passes locally (exit 0; the non-static data-provider issue was fixed by #352). The solr suite still needs a running Solr instance onlocalhost:8983that isn't available locally, so it remains unverified here. Gating those two is left for CI/a follow-up.Verified with a
trigger_deprecation()probe insrc/lib/FieldType/RichText/Value.php(constructor, exercised by hundreds of unit tests): the unit suite correctly failed, then passed again after removal (git diff -- srcclean).composer check-csandphpstan analyseare unchanged (clean).To refresh a baseline: ensure
vendor/is a real (non-symlinked) directory with PHPUnit 11 installed, then runvendor/bin/phpunit -c <config> --generate-baseline <baseline>.Base branch:
6.0(the PHPUnit 11 migration landed asec4f4e3— squash-merge of #352 — and this branch is now rebased directly onto it).ignoreIndirectDeprecationsis deliberatelyfalse: PHPUnit classifies a Symfony deprecation caused by our code as "indirect" (calleedeprecation-contracts/function.php, caller the vendor method), sotruewould silently drop every deprecated-vendor-API usage. Vendor-originated baseline entries are expected; new ones fail the build until the baseline is refreshed on purpose.Re-verified after the rebase onto
6.0:failOnWarning="true" failOnNotice="true"are already present on everyphpunit*.xmlconfig (added by #352),symfony/phpunit-bridgeis already fully gone fromcomposer.jsonwith zero remaining usages anywhere in the repo, and noExpectDeprecationTrait/expectDeprecation()calls exist to convert. No additional commits were needed on top of the deprecation-gate commit. Both gated suites (phpunit.xml,phpunit-integration.xml) still pass with the existing baselines on PHP 8.3 (exit 0);phpunit-integration-legacy-solr.xmlis unrunnable locally (needs a live Solr instance onlocalhost:8983) but is unaffected by this change since it isn't gated.For QA:
N/A
Documentation:
N/A