Skip to content

Update PHPUnit documentation for CakePHP 5.x requirements#8186

Merged
LordSimal merged 1 commit into5.xfrom
fix-phpunit-docs
Jan 28, 2026
Merged

Update PHPUnit documentation for CakePHP 5.x requirements#8186
LordSimal merged 1 commit into5.xfrom
fix-phpunit-docs

Conversation

@dereuromark
Copy link
Member

Summary

  • Update PHPUnit version requirements to reflect current CakePHP 5.x needs (^11.5.3 || ^12.1.3)
  • Add migration guide from annotations to PHP 8 attributes (required for PHPUnit 12)
  • Document test double changes (createStub vs createMock)
  • Add PHPUnit 12 specific breaking changes
  • Include comprehensive upgrade checklist

Context

CakePHP 5.x now requires PHPUnit 11.5.3+ or 12.1.3+, but the documentation still referenced PHPUnit 10 as the minimum version. This update brings the appendix in line with current requirements and provides guidance for users upgrading from PHPUnit 10 through 11 to 12.

Key Changes

PHPUnit Version PHP Requirement
PHPUnit 11.5.3+ PHP 8.2+
PHPUnit 12.1.3+ PHP 8.3+

Fixes #8172

Sources

CakePHP 5.x now requires PHPUnit ^11.5.3 || ^12.1.3, making the previous
PHPUnit 10 documentation outdated. This updates the guide to cover:

- Current version requirements (PHPUnit 11.5+ or 12.1+)
- Migration from annotations to PHP 8 attributes
- Data provider static requirements
- Test double changes (createStub vs createMock)
- PHPUnit 12 specific breaking changes
- Comprehensive upgrade checklist

Fixes #8172
@LordSimal LordSimal merged commit 66989ae into 5.x Jan 28, 2026
5 checks passed
@LordSimal LordSimal deleted the fix-phpunit-docs branch January 28, 2026 17:00
dereuromark added a commit that referenced this pull request Jan 28, 2026
Remove phpunit10.md in favor of renamed phpunit-upgrade.md which
incorporates the useful content from #8186.
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.

PHPUnit info outdated

2 participants