Skip to content

Commit 8ebd8ec

Browse files
Build/Test Tools: Add Composer dependency on the PHPUnit Polyfills package.
The PHPUnit Polyfills package is an add-on for PHPUnit, which works around common issues for writing PHPUnit cross-version compatible tests. Features: * It offers a full set of polyfills for assertions and expectations introduced in PHPUnit since PHPUnit 4.8. * It offers two generic TestCases which include these polyfills, but also solve the `void` return type issue for the fixtures methods. * It offers a PHPUnit cross-version solution for the changes to the PHPUnit `TestListener` implementation. * Supports PHPUnit 4.8 – current. * Supports and is compatible with PHP 5.4 – current. The package has no outside dependencies, other than PHPUnit, is actively maintained and endorsed by the maintainer of PHPUnit itself (the only package of its kind which has ever been endorsed). Props jrf, hellofromTonya, johnbillion, netweb, SergeyBiryukov. See #46149. git-svn-id: https://develop.svn.wordpress.org/trunk@51559 602fd350-edb4-49c9-b593-d223f7449a82
1 parent 00140db commit 8ebd8ec

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@
1717
"squizlabs/php_codesniffer": "3.6.0",
1818
"wp-coding-standards/wpcs": "~2.3.0",
1919
"phpcompatibility/phpcompatibility-wp": "~2.1.2",
20-
"phpunit/phpunit": "^5.7 || ^6.5 || ^7.5"
20+
"phpunit/phpunit": "^5.7 || ^6.5 || ^7.5",
21+
"yoast/phpunit-polyfills": "^1.0"
2122
},
2223
"scripts": {
2324
"compat": "@php ./vendor/squizlabs/php_codesniffer/bin/phpcs --standard=phpcompat.xml.dist --report=summary,source",

0 commit comments

Comments
 (0)