Make WordPress Core

Changeset 63760


Ignore:
Timestamp:
09/18/2026 02:04:44 PM (12 hours ago)
Author:
SergeyBiryukov
Message:

Build/Test Tools: Remove WP_UnitTestCase_Base::checkRequirements().

The method was hard-deprecated in WordPress 5.9 and retained only as a backward compatibility layer for external test suites that may have been still calling parent::checkRequirements() on PHPUnit 5/6.

As the method has not been functional since TestCase::checkRequirements() became private in PHPUnit 7.0, it should be safe to remove at this point.

Reference: PHPUnit Compatibility and WordPress Versions.

Developed in https://github.com/WordPress/wordpress-develop/pull/13599.

Follow-up to r51605.

Props codesawmir, mukesh27.
Fixes #66135.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/includes/abstract-testcase.php

    r63633 r63760  
    14301430
    14311431        /**
    1432          * Allows tests to be skipped on single or multisite installs by using @group annotations.
    1433          *
    1434          * This is a custom extension of the PHPUnit requirements handling.
    1435          *
    1436          * @since 3.5.0
    1437          * @deprecated 5.9.0 This method has not been functional since PHPUnit 7.0.
    1438          */
    1439         protected function checkRequirements() {
    1440                 // For PHPUnit 5/6, as we're overloading a public PHPUnit native method in those versions.
    1441                 if ( is_callable( 'PHPUnit\Framework\TestCase', 'checkRequirements' ) ) {
    1442                         parent::checkRequirements();
    1443                 }
    1444         }
    1445 
    1446         /**
    14471432         * Skips the current test if there is an open Trac ticket associated with it.
    14481433         *
Note: See TracChangeset for help on using the changeset viewer.