Skip to content

Conversation

@huangdijia
Copy link
Member

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.

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.
@huangdijia huangdijia added this to the v3.2 milestone Oct 25, 2025
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.
@huangdijia huangdijia marked this pull request as ready for review October 25, 2025 09:44
Copy link

Copilot AI left a 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 @coversNothing docblock annotations with #[CoversNothing] PHP attributes
  • Removed the RunTestsInCoroutine trait 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 limingxinleo merged commit 79b564a into hyperf:3.2 Oct 27, 2025
73 checks passed
@huangdijia huangdijia deleted the upgrade-phpunit-to-11.x branch October 27, 2025 02:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants