Require sebastian/diff 9 - #94
Merged
Merged
Conversation
PHPUnit 13.2 soft-deprecates expectExceptionMessage() in favour of the longer name, which says that the message is matched as equal-or-substring rather than leaving it ambiguous. phpstan-deprecation-rules reports the two call sites as soon as the floor allows 13.2.
Dropping 7 and 8 means the code no longer has to work across three major versions of the diff API, and StrictUnifiedDiffOutputBuilder can use the header option directly, which only exists from 8.3 on. The dev floors move with it, because CI resolves lowest as well as highest: PHPUnit requires diff 9 from 13.2.0, and PHP CS Fixer allows it from 3.95.18, so leaving either floor lower makes the lowest job unresolvable.
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.
Raises the minimum for
sebastian/diffto^9.0.Dropping 7 and 8 means the code no longer has to work across three major versions of the diff API. Concretely,
StrictUnifiedDiffOutputBuildercan take the header verbatim through theheaderoption, which only exists from 8.3 on; #93 had to reconstruct the same string throughfromFile/toFileto stay compatible with the older range. I have left that call as it is here, so this PR is only the constraint change — happy to simplify it in a follow-up if you would like.The dev floors have to move too
CI resolves
lowestas well ashighest, and on the lowest leg the old dev floors are unsatisfiable against a root requirement of^9.0:phpunit/phpunit^13.1.7^13.2sebastian/diff ^8.3.0; 13.2.0 is the first to require^9.0friendsofphp/php-cs-fixer^3.95.1^3.95.18^4.0.6 || … || ^8.0; 3.95.18 is the first to add^9.0Verified:
composer update --prefer-lowest --dry-runnow resolves, taking PHPUnit down to exactly 13.2.0 withsebastian/diffstaying at 9.One knock-on change
PHPUnit 13.2 soft-deprecates
expectExceptionMessage(), andphpstan-deprecation-rulesreports it, so the two call sites intests/move toexpectExceptionMessageIsOrContains(). Without that,phpstan analysefails as soon as the floor allows 13.2. Kept as its own commit.Verified
vendor/bin/phpunit— 185 tests, 667 assertions, OKvendor/bin/php-cs-fixer check— clean, 0 of 211 files need fixingvendor/bin/phpstan analyse— no errorscomposer update --prefer-lowest --dry-run— resolves, no conflict