Skip to content

Update PHPunit to 13.0.5#90

Draft
jcsilkey wants to merge 3 commits intospiral:3.xfrom
jcsilkey:phpunit-13
Draft

Update PHPunit to 13.0.5#90
jcsilkey wants to merge 3 commits intospiral:3.xfrom
jcsilkey:phpunit-13

Conversation

@jcsilkey
Copy link
Copy Markdown

@jcsilkey jcsilkey commented Mar 4, 2026

What was changed

  • Updated PHPUnit to 13.0.5
  • Changed base TestCase to extend new PHPUnit\Framework\TestCase::invokeTestMethod instead of PHPUnit\Framework\TestCase::runTest
  • Updated PHPUnit configuration to match current schema
  • Ignore the PHPUnit result cache in git
  • Tell composer to not generate a lock file

Why?

Many current versions of great testing tools/libraries (such as Pest) will not work with the current spiral/testing package due to it being pinned to an old version of PHPUnit.

Checklist

@jcsilkey jcsilkey marked this pull request as draft March 4, 2026 06:17
@roxblnfk
Copy link
Copy Markdown
Member

roxblnfk commented Mar 4, 2026

Need to drop PHP <8.4

@jcsilkey
Copy link
Copy Markdown
Author

jcsilkey commented Mar 4, 2026

Need to drop PHP <8.4

Updated.

Copy link
Copy Markdown
Member

@roxblnfk roxblnfk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@roxblnfk
Copy link
Copy Markdown
Member

roxblnfk commented Mar 5, 2026

Are you going to add something or we can merge it?

@roxblnfk roxblnfk added this to the 2.x milestone Mar 5, 2026
@jcsilkey
Copy link
Copy Markdown
Author

jcsilkey commented Mar 5, 2026

Are you going to add something or we can merge it?

@roxblnfk I've tested updating https://github.com/spiral/framework to use this branch, and the tests fail miserably. I've been holding back because I've been trying to determine if the test failures are due to breaking changes going from phpunit 10 > 13 or because of an issue with these changes.

@gam6itko
Copy link
Copy Markdown
Contributor

LGTM

@roxblnfk
Copy link
Copy Markdown
Member

roxblnfk commented Mar 23, 2026

If you simply update PHPUnit to the latest version, user tests will break.
So, I think we can just release it in v3.0.0

This way, developers will manually update the testing package to v3 and use rector to update the tests. Meanwhile, nothing will break within version 2.

@roxblnfk roxblnfk changed the base branch from 2.x to 3.x March 23, 2026 16:57
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.

Support phpUnit 13

3 participants