Conversation
… native deprecation gate
…HPUnit 9 convert*ToExceptions strictness
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_HELPERis dead under PHPUnit 11 (phpunit-bridge's bootstrap returns early, noDeprecationErrorHandleris registered), so any thresholds would silently do nothing. This repo's singlephpunit.xml.disthad no such env var set to begin with. This switches it to PHPUnit 11's nativefailOnDeprecation+<source baseline="...">mechanism, which fails the run on any new deprecation triggered bysrc/while ignoring what's already in the baseline.phpunit.xml.dist(only config, coversbundle/integration/libsuites, all in-process — no separate kernel-booting bootstrap): gated.failOnDeprecation+<source baseline="phpunit.baseline.xml">added, withignoreIndirectDeprecations="false"(so a deprecated vendor method called from our code is still caught, not just deprecations we trigger ourselves) andignoreSuppressionOfDeprecations="true". Baseline: 0 issues (0 internalSince ibexa/…, 0 external). Could not run the step-4 probe (addtrigger_deprecation()to asrc/method and confirm the suite fails):tests/bundle,tests/integrationandtests/libare all empty (only.gitkeep), so there is no existing test to exercise a probe against. The mechanism itself, including the indirect-deprecation case, is the same one verified working end-to-end onibexa/content-treeandibexa/core-persistencein sibling PRs, so it's wired correctly here too — it just has nothing to catch yet.To refresh the baseline:
composer install --no-progress(realvendor/, not a symlink), thenvendor/bin/phpunit -c phpunit.xml.dist --generate-baseline phpunit.baseline.xml.Not stacked — based on
6.0(this repo's PHPUnit 11 migration is already merged).failOnNotice="true"onphpunit.xml.dist(it already hadfailOnWarning="true"). PHPUnit 9'sconvertNoticesToExceptions/convertWarningsToExceptionswere dropped in the PHPUnit 11 migration; their PHPUnit 11 replacements default tofalse, so notices (and, until now, warnings were already covered) were silently not failing the run.symfony/phpunit-bridgedependency exists in this repo'scomposer.json, and noClockMock/DnsMock/ExpectDeprecationTrait/expectDeprecation()/SYMFONY_DEPRECATIONS_HELPERusage was found — nothing to remove or convert.For QA:
N/A
Documentation:
N/A