From f926812c6b3d456dfbd13c706293f49e9a10bc2a Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Thu, 21 May 2020 20:33:26 +0200 Subject: [PATCH] [PhpUnitBridge] fix setting platform.php --- bin/simple-phpunit | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/simple-phpunit b/bin/simple-phpunit index e416a23a..f0c7c408 100755 --- a/bin/simple-phpunit +++ b/bin/simple-phpunit @@ -121,7 +121,7 @@ if (!file_exists("$PHPUNIT_DIR/phpunit-$PHPUNIT_VERSION/phpunit") || md5_file(__ $passthruOrFail("$COMPOSER require --no-update phpunit/phpunit-mock-objects \"~3.1.0\""); } - if (preg_match('{\^(\d++\.\d++)[\d\.]*$}', $info['requires']['php'], $phpVersion) && version_compare($phpVersion[1], PHP_VERSION, '<')) { + if (preg_match('{\^((\d++\.)\d++)[\d\.]*$}', $info['requires']['php'], $phpVersion) && version_compare($phpVersion[2].'99', PHP_VERSION, '<')) { $passthruOrFail("$COMPOSER config platform.php \"$phpVersion[1].99\""); } else { $passthruOrFail("$COMPOSER config --unset platform.php");