[2.x] chore: bump phpunit/phpunit to ^12.5.22 - #4585
Merged
Conversation
Unblocks composer install on flarum/testing consumers: the PHPUnit 11.x line has no fix for GHSA-qrr6-mg7r-m243 (PKSA-5jz8-6tcw-pbk4), so every 11.x version is filtered by Composer's advisory check. PHPUnit 12 requires PHP 8.3+, which matches the 2.x floor. Flarum's own test suites already use PHP 8 attributes exclusively; third-party extensions still using @test / @dataProvider docblock annotations will need to migrate. Closes #4584
2 tasks
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
phpunit/phpunitfrom^11.0to^12.5.22inphp-packages/testingand rootcomposer.json.composer installon every repo consumingflarum/testing(directly or viaflarum/phpstan).Why
As of 2026-04-18,
composer installfails with:Two advisories apply to PHPUnit 11.x:
Bumping to
^12.5.22is the minimum to restore a resolvable dependency graph.Compatibility
^8.3).#[Test],#[DataProvider]). No@test/@dataProviderannotations remain in-tree.AllowMockObjectsWithoutExpectationsnotices — out of scope here).Downstream impact
Third-party extensions still using docblock annotations (
@test,@dataProvider,@depends,@before,@after,@group,@covers,@runInSeparateProcess) will need to migrate to PHP 8 attributes. Release notes for the next 2.x release should link the PHPUnit annotations-to-attributes migration guide.Also note:
flarum/phpstanpinsflarum/testing ^2.0— a coordinatedflarum/phpstanrelease will likely be needed afterflarum/testingis tagged to actually unblock downstreamcomposer install.Test plan
composer update phpunit/phpunit -Wresolves cleanly against current tree.composer auditno longer reports PHPUnit advisories.framework/coreunit suite passes under PHPUnit 12.5.23.framework/coreintegration suite loads test cases without error.Closes #4584