Support PHPUnit 12 alongside 10.5 - #1371
Merged
Merged
Conversation
Closed
Contributor
Author
jaapio
approved these changes
Aug 31, 2026
…10.5 CoversMethod is a PHPUnit 11/12-only attribute, but composer.lock still resolves phpunit/phpunit to the 10.5 line under the new "^10.5 || ^12.0" constraint, so PHPStan (and PHPUnit itself at runtime) can't find the attribute class. CoversClass already attributes coverage to the whole class, so nothing is lost by dropping the redundant per-method attributes. Assisted-by: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PP4LkejR5PSubbhNmF4RkT Signed-off-by: lina.wolf
linawolf
force-pushed
the
task/phpunit-12-upgrade
branch
from
September 1, 2026 13:57
ef89383 to
6c30028
Compare
PHPUnit 12 no longer executes tests via the @dataProvider docblock annotation, so ReadOptionReturnTypeExtensionTest's data-provided test ran with zero arguments and errored under the "highest" dependency CI matrix (PHP 8.4, PHPUnit 12). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PP4LkejR5PSubbhNmF4RkT Signed-off-by: lina.wolf
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.
Continues #1327.
Drop CoversMethod attributes incompatible with locked PHPUnit 10.5
CoversMethod is a PHPUnit 11/12-only attribute, but composer.lock still
resolves phpunit/phpunit to the 10.5 line under the new "^10.5 || ^12.0"
constraint, so PHPStan (and PHPUnit itself at runtime) can't find the
attribute class. CoversClass already attributes coverage to the whole
class, so nothing is lost by dropping the redundant per-method attributes.
Assisted-by: Claude Sonnet 5 noreply@anthropic.com
Claude-Session: https://claude.ai/code/session_01PP4LkejR5PSubbhNmF4RkT
Signed-off-by: lina.wolf