Make WordPress Core

Opened 2 months ago

#59486 new enhancement

Make test suite compatible with PHPUnit 10

Reported by: dingo_d's profile dingo_d Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 6.4
Component: Build/Test Tools Keywords: dev-feedback needs-testing
Focuses: Cc:

Description

PHPUnit 10 was released back in February of 2023, and included many breaking changes - they completely rewrote the internal functionality of PHPUnit (mainly the event system for extending the test runner). Besides that, they upped the minimum PHP version to >=8.1, so for WordPress, it could only be used on PHP versions of >=8.1.

While this is not a huge and critical update, since the tests are running fine on PHP versions all the way up to version 8.3, it would be a good idea to start preparing for PHPUnit 10 compatibility.

Besides being up to date, it will allow external testing library maintainers (such as wp-browser or wp-pest), to use the latest versions of both PHPUnit, or dependencies that are using PHPUnit 10 (such as PestPHP v2 which depends on PHPUnit 10).

I understand that this is a huge undertaking, but it's okay to have a ticket open for this (I didn't find one opened while searching, could be wrong tho), so that we can keep track of changes, and maybe create a roadmap or a to-do list of what needs to be fixed in order to make WordPress test suite compatible with PHPUnit 10.

Change History (0)

Note: See TracTickets for help on using tickets.