-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Update PHPUnit to version 11 #7577
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
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.