WordPress.org

Make WordPress Core

Changeset 49037 for trunk/composer.json


Ignore:
Timestamp:
09/23/2020 01:52:02 PM (5 months ago)
Author:
SergeyBiryukov
Message:

Tests: Backport two changes from PHPUnit 9.3:

  • Replace the Match interface with ParametersMatch, to avoid parse errors due to match being a reserved keyword in PHP 8.
  • Replace ReflectionParameter::getClass() usage, which is deprecated in PHP 8.

This allows tests relying on the getMockForAbstractClass() and getMockBuilder() methods to run again on PHP 8.

When the test suite is updated for compatibility with PHPUnit 9.x, these overrides can be removed.

Follow-up to [48972].

See #50913, #50902.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/composer.json

    r47927 r49037  
    1717        "wp-coding-standards/wpcs": "~2.3.0",
    1818        "phpcompatibility/phpcompatibility-wp": "^2.1.0",
    19         "phpunit/phpunit": "^5.7 || ^6.5 || ^7.5"
     19        "phpunit/phpunit": "^7.5"
     20    },
     21    "autoload-dev": {
     22        "files": [
     23            "tests/phpunit/includes/phpunit7/MockObject/Builder/NamespaceMatch.php",
     24            "tests/phpunit/includes/phpunit7/MockObject/Builder/ParametersMatch.php",
     25            "tests/phpunit/includes/phpunit7/MockObject/InvocationMocker.php",
     26            "tests/phpunit/includes/phpunit7/MockObject/MockMethod.php"
     27        ],
     28        "exclude-from-classmap": [
     29            "vendor/phpunit/phpunit/src/Framework/MockObject/Builder/NamespaceMatch.php",
     30            "vendor/phpunit/phpunit/src/Framework/MockObject/Builder/ParametersMatch.php",
     31            "vendor/phpunit/phpunit/src/Framework/MockObject/InvocationMocker.php",
     32            "vendor/phpunit/phpunit/src/Framework/MockObject/MockMethod.php"
     33        ]
    2034    },
    2135    "scripts": {
Note: See TracChangeset for help on using the changeset viewer.