[wp-trac] [WordPress Trac] #46149: PHPUnit 8.x support
WordPress Trac
noreply at wordpress.org
Wed Aug 11 05:49:24 UTC 2021
#46149: PHPUnit 8.x support
-------------------------------------------------+-------------------------
Reporter: SergeyBiryukov | Owner: jrf
Type: task (blessed) | Status: assigned
Priority: high | Milestone: 5.9
Component: Build/Test Tools | Version:
Severity: normal | Resolution:
Keywords: has-patch has-unit-tests early php8 | Focuses:
needs-dev-note |
-------------------------------------------------+-------------------------
Comment (by jrf):
Patch `46149-hard-deprecate-checkRequirements.patch` is a follow-up to the
previous round of changes where this method, which is not used by WP Core
was missed.
Full description for the patch:
== Build/Test Tools: hard deprecate
WP_UnitTestCase_Base::checkRequirements().
The `WP_UnitTestCase_Base::checkRequirements()` method calls the
`parent::checkRequirements()` method, but this method became `private` in
PHPUnit 7.0.0 via commit
[https://github.com/sebastianbergmann/phpunit/commit/932238a6a3018cdfac6c2a7d8f1d5d49e65f5dc0
sebastianbergmann/phpunit at 932238a].
Aside from that the `TestCase::getAnnotations()` method which is called
next is now also removed in PHPUnit 9.5.0.
WP Core doesn't use the method anymore and the method only remains to
prevent potentially breaking external integration tests relying on the
method.
However, in effect, the method is not functional anymore knowing the
above.
So, I'm proposing to hard deprecate the method, effectively rendering it
useless, except to prevent breaking test suites which still called the
method.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/46149#comment:113>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list