From a4fcc69b6235dc8f7b7754e3c21781ba0feee98b Mon Sep 17 00:00:00 2001 From: Nestor Soriano Date: Fri, 2 Oct 2020 13:13:18 +0200 Subject: [PATCH] Use a custom version of PHPUnit 7 for PHP 8 compatibility This commit replaces the standard PHPUnit 7 package with a custom GitHub fork with modifications to support PHP 8. --- composer.json | 8 ++++- composer.lock | 81 ++++++++++++++++++++++++++++++++++++++++++++------- 2 files changed, 78 insertions(+), 11 deletions(-) diff --git a/composer.json b/composer.json index cf764aa6345..12ddf8ccf98 100644 --- a/composer.json +++ b/composer.json @@ -19,10 +19,16 @@ "woocommerce/woocommerce-blocks": "3.4.0" }, "require-dev": { - "phpunit/phpunit": "7.5.20", + "phpunit/phpunit": "dev-add-compatibility-with-php8-to-phpunit-7", "woocommerce/woocommerce-sniffs": "0.1.0", "wp-cli/i18n-command": "2.2.5" }, + "repositories": [ + { + "type": "vcs", + "url": "https://github.com/woocommerce/phpunit" + } + ], "config": { "platform": { "php": "7.1" diff --git a/composer.lock b/composer.lock index 25a47e73e88..2a0af73cf74 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "dcf828ebdcdcecfa605e7d3516f6e769", + "content-hash": "4c864b8074b4d5dc351694560349f17f", "packages": [ { "name": "automattic/jetpack-autoloader", @@ -682,6 +682,20 @@ "constructor", "instantiate" ], + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Finstantiator", + "type": "tidelift" + } + ], "time": "2020-05-29T17:27:14+00:00" }, { @@ -944,6 +958,12 @@ "object", "object graph" ], + "funding": [ + { + "url": "https://tidelift.com/funding/github/packagist/myclabs/deep-copy", + "type": "tidelift" + } + ], "time": "2020-06-29T13:22:24+00:00" }, { @@ -1674,16 +1694,16 @@ }, { "name": "phpunit/phpunit", - "version": "7.5.20", + "version": "dev-add-compatibility-with-php8-to-phpunit-7", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "9467db479d1b0487c99733bb1e7944d32deded2c" + "url": "https://github.com/woocommerce/phpunit.git", + "reference": "6f4610e48d08489645bd2b5570f9b5e399c9d6db" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/9467db479d1b0487c99733bb1e7944d32deded2c", - "reference": "9467db479d1b0487c99733bb1e7944d32deded2c", + "url": "https://api.github.com/repos/woocommerce/phpunit/zipball/6f4610e48d08489645bd2b5570f9b5e399c9d6db", + "reference": "6f4610e48d08489645bd2b5570f9b5e399c9d6db", "shasum": "" }, "require": { @@ -1736,7 +1756,17 @@ "src/" ] }, - "notification-url": "https://packagist.org/downloads/", + "autoload-dev": { + "classmap": [ + "tests/" + ], + "files": [ + "src/Framework/Assert/Functions.php", + "tests/_files/CoverageNamespacedFunctionTest.php", + "tests/_files/CoveredFunction.php", + "tests/_files/NamespaceCoveredFunction.php" + ] + }, "license": [ "BSD-3-Clause" ], @@ -1754,7 +1784,21 @@ "testing", "xunit" ], - "time": "2020-01-08T08:45:45+00:00" + "support": { + "issues": "https://github.com/sebastianbergmann/phpunit/issues", + "source": "https://github.com/woocommerce/phpunit/tree/add-compatibility-with-php8-to-phpunit-7" + }, + "funding": [ + { + "type": "github", + "url": "https://github.com/sebastianbergmann" + }, + { + "type": "custom", + "url": "https://phpunit.de/donate.html" + } + ], + "time": "2020-10-02T10:22:34+00:00" }, { "name": "rmccue/requests", @@ -2531,6 +2575,20 @@ "polyfill", "portable" ], + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], "time": "2020-07-14T12:35:20+00:00" }, { @@ -2928,7 +2986,9 @@ ], "aliases": [], "minimum-stability": "dev", - "stability-flags": [], + "stability-flags": { + "phpunit/phpunit": 20 + }, "prefer-stable": true, "prefer-lowest": false, "platform": { @@ -2937,5 +2997,6 @@ "platform-dev": [], "platform-overrides": { "php": "7.1" - } + }, + "plugin-api-version": "1.1.0" }