Update PHPUnit to version 11#7577
Merged
limingxinleo merged 9 commits intohyperf:3.2from Oct 27, 2025
Merged
Conversation
Bumped phpunit/phpunit dependency from ^10.1.3 to ^11.0 in composer.json and updated the phpunit.xml.dist schema reference to 11.5 to ensure compatibility with the latest PHPUnit version.
Replaces the @coversNothing annotation with the #[CoversNothing] attribute in LazyCollectionIsLazyTest and LazyCollectionTest to align with PHPUnit's attribute-based syntax.
Bumped PHPUnit dependency to version 11 in composer.json. Removed redundant @coversNothing docblock tags from TestCase and test classes, relying on the #[CoversNothing] attribute instead.
There was a problem hiding this comment.
Pull Request Overview
This PR upgrades PHPUnit from version 10 to version 11 across the project. The upgrade includes updating dependency constraints, removing deprecated annotations in favor of PHP attributes, and cleaning up compatibility code.
Key Changes:
- Updated PHPUnit dependency from ^10.0/^10.1.3 to ^11.0 in composer files
- Replaced deprecated
@coversNothingdocblock annotations with#[CoversNothing]PHP attributes - Removed the
RunTestsInCoroutinetrait which is no longer needed
Reviewed Changes
Copilot reviewed 13 out of 14 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| composer.json | Updated PHPUnit dependency constraint to ^11.0 |
| src/testing/composer.json | Updated PHPUnit dependency constraint to ^11.0 |
| phpunit.xml.dist | Updated schema reference from 10.2 to 11.5 |
| src/testing/co-phpunit | Updated minimum PHP version requirement from 8.1 to 8.2 and reorganized extension checks |
| src/testing/src/TestCase.php | Removed deprecated @coversNothing annotation and RunTestsInCoroutine trait usage |
| src/testing/src/Constraint/ArraySubset.php | Updated to use static Exporter::export() method instead of instance method |
| src/testing/tests/*.php | Removed deprecated @coversNothing annotations (now using attributes) |
| src/collection/tests/*.php | Replaced @coversNothing annotations with #[CoversNothing] attributes and added missing import |
| src/testing/src/Concerns/RunTestsInCoroutine.php | Deleted entire file as trait is no longer needed |
| CHANGELOG-3.2.md | Documented PHPUnit upgrade and trait removal |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
limingxinleo
approved these changes
Oct 27, 2025
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.
Bumped phpunit/phpunit dependency from ^10.1.3 to ^11.0 in composer.json and updated the phpunit.xml.dist schema reference to 11.5 to ensure compatibility with the latest PHPUnit version.