diff options
author | Sergey Biryukov <sergeybiryukov@git.wordpress.org> | 2020-09-23 13:52:02 +0000 |
---|---|---|
committer | Sergey Biryukov <sergeybiryukov@git.wordpress.org> | 2020-09-23 13:52:02 +0000 |
commit | c31a5512732647412d8df03f43c1e0768db281ea (patch) | |
tree | 749127c5d9ebad00858b5c8b4807371273743a45 /composer.json | |
parent | 7d15225ad0f722e1ce42f4030a48ecd41636eea4 (diff) | |
download | wordpress-c31a5512732647412d8df03f43c1e0768db281ea.tar.gz wordpress-c31a5512732647412d8df03f43c1e0768db281ea.zip |
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.
git-svn-id: https://develop.svn.wordpress.org/trunk@49037 602fd350-edb4-49c9-b593-d223f7449a82
Diffstat (limited to 'composer.json')
-rw-r--r-- | composer.json | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/composer.json b/composer.json index 58e456582c..41368ef25e 100644 --- a/composer.json +++ b/composer.json @@ -16,7 +16,21 @@ "dealerdirect/phpcodesniffer-composer-installer": "~0.6.0", "wp-coding-standards/wpcs": "~2.3.0", "phpcompatibility/phpcompatibility-wp": "^2.1.0", - "phpunit/phpunit": "^5.7 || ^6.5 || ^7.5" + "phpunit/phpunit": "^7.5" + }, + "autoload-dev": { + "files": [ + "tests/phpunit/includes/phpunit7/MockObject/Builder/NamespaceMatch.php", + "tests/phpunit/includes/phpunit7/MockObject/Builder/ParametersMatch.php", + "tests/phpunit/includes/phpunit7/MockObject/InvocationMocker.php", + "tests/phpunit/includes/phpunit7/MockObject/MockMethod.php" + ], + "exclude-from-classmap": [ + "vendor/phpunit/phpunit/src/Framework/MockObject/Builder/NamespaceMatch.php", + "vendor/phpunit/phpunit/src/Framework/MockObject/Builder/ParametersMatch.php", + "vendor/phpunit/phpunit/src/Framework/MockObject/InvocationMocker.php", + "vendor/phpunit/phpunit/src/Framework/MockObject/MockMethod.php" + ] }, "scripts": { "compat": "@php ./vendor/squizlabs/php_codesniffer/bin/phpcs --standard=phpcompat.xml.dist --report=summary,source", |