From 8ebd8ec0e458b2f2ffcb47aeae9c80cbe4a97a75 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Fri, 6 Aug 2021 00:33:33 +0000 Subject: [PATCH] Build/Test Tools: Add Composer dependency on the PHPUnit Polyfills package. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- composer.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/composer.json b/composer.json index c753be2ab0..804dfb090c 100644 --- a/composer.json +++ b/composer.json @@ -17,7 +17,8 @@ "squizlabs/php_codesniffer": "3.6.0", "wp-coding-standards/wpcs": "~2.3.0", "phpcompatibility/phpcompatibility-wp": "~2.1.2", - "phpunit/phpunit": "^5.7 || ^6.5 || ^7.5" + "phpunit/phpunit": "^5.7 || ^6.5 || ^7.5", + "yoast/phpunit-polyfills": "^1.0" }, "scripts": { "compat": "@php ./vendor/squizlabs/php_codesniffer/bin/phpcs --standard=phpcompat.xml.dist --report=summary,source",