Repository navigation
Conversation
Add phpunit-strict.xml.dist: phpunit.xml.dist plus failOnDeprecation and `ignoreIndirectDeprecations`, so deprecations that only third-party code causes (e.g. old transitive dependencies on "lowest") are ignored, while the ones our own code or tests trigger fail the run. It needs PHPUnit 11.1+, because older versions report the unknown attribute as a configuration warning. The CI jobs that run "highest" dependencies with the newest PHPUnit version of each Pimcore line use it (flagged via `strict` in the matrix). The tests of the deprecated BC layer are excluded there: loading the deprecated classes triggers their deprecation before any test runs, which PHPUnit 13 reports without a trigger classification and thus can't ignore. Also add a `tests:strict` composer script. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
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.
Summary
Picks up the idea of #44 (suppress only the deprecations we can't do anything about, instead of being blind to all of them), but with PHPUnit's own options instead of
symfony/phpunit-bridge.phpunit-strict.xml.dist:phpunit.xml.distplusfailOnDeprecation="true"and<source ignoreIndirectDeprecations="true">. Deprecations that only third-party code causes are ignored, the ones our own code or tests trigger fail the run. It needs PHPUnit 11.1+ (older versions report the unknown attribute as a configuration warning, whichfailOnWarningturns into a failure), so the default config stays as it is.11.5 / PHP 8.3 / ^12.5,12.0 / PHP 8.4 / ^13.4,2026.1 / PHP 8.4 / ^13.4and2026.1 / PHP 8.5 / ^13.4. They are flagged viastrictin the matrix (twoincludeentries that add no jobs) and show/ strict deprecationsin their name. "lowest" and PHPUnit 9/10 are unchanged: what we trigger depends on the Pimcore line, not on the PHPUnit version, and "lowest" only adds third-party noise.tests:strictcomposer script;CLAUDE.mdand.gitattributesupdated.Findings behind it
trigger_error(E_USER_DEPRECATED)from a test, checked on PHPUnit 12 and 13) fail the run.Test plan
composer tests:strictlocally with PHPUnit 13.4.1 and 12.5.38 (PHP 8.5, Pimcore 2026): 101 tests, 0 deprecations, exit code 0strictphpunit-strict.xml.dist(101 tests, no deprecations), including Pimcore 11.5 and 12 that weren't run locallyphpunit.xml.dist)🤖 Generated with Claude Code