Skip to content

Upgrade PHPUnit to 10#60

Merged
janedbal merged 2 commits into
masterfrom
upgrade-phpunit-10
May 19, 2026
Merged

Upgrade PHPUnit to 10#60
janedbal merged 2 commits into
masterfrom
upgrade-phpunit-10

Conversation

@janedbal
Copy link
Copy Markdown
Member

Summary

  • Bump phpunit/phpunit to ^10.5.46 (PHP 8.1+ allows it now after Drop PHP 7.4 and 8.0 support, modernize to PHP 8.1+ #59)
  • Rewrite phpunit.xml.dist for PHPUnit 10: drop deprecated beStrictAboutCoversAnnotation, add cacheDirectory, displayDetailsOn*, individual failOn* flags, explicit <testsuites>, and <source restrictDeprecations restrictNotices restrictWarnings>
  • Switch IntegrationTest::testResultCache from @dataProvider to #[DataProvider] and make provideExtension static (required by PHPUnit 10)
  • Drop the SlevomatCodingStandard.Commenting.ForbiddenAnnotations.AnnotationForbidden exclusion from phpcs.xml.dist (only existed because PHPUnit 9 lacked #[DataProvider])

Mirrors shipmonk-rnd/phpstan-rules#362.

Note: failOnAllIssues was considered but it was added in PHPUnit 11.4, which requires PHP 8.2+. Staying on PHP 8.1 means PHPUnit 10 is the cap, so individual failOn* flags are used.

Test plan

  • composer check:tests (18/18 pass on PHPUnit 10.5.63)
  • composer check:cs
  • composer check:types
  • composer check:dependencies
  • composer check:composer

Co-Authored-By: Claude noreply@anthropic.com

Co-Authored-By: Claude <noreply@anthropic.com>
@janedbal janedbal marked this pull request as ready for review May 19, 2026 09:23
Available since PHPUnit 10.5.5, not 11.4 as previously assumed.

Co-Authored-By: Claude Code
@janedbal janedbal merged commit 6e0355e into master May 19, 2026
11 checks passed
@janedbal janedbal deleted the upgrade-phpunit-10 branch May 19, 2026 10:39
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.

1 participant