Skip to content

Commit f926812

Browse files
[PhpUnitBridge] fix setting platform.php
1 parent 392eff4 commit f926812

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bin/simple-phpunit

+1-1
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ if (!file_exists("$PHPUNIT_DIR/phpunit-$PHPUNIT_VERSION/phpunit") || md5_file(__
121121
$passthruOrFail("$COMPOSER require --no-update phpunit/phpunit-mock-objects \"~3.1.0\"");
122122
}
123123

124-
if (preg_match('{\^(\d++\.\d++)[\d\.]*$}', $info['requires']['php'], $phpVersion) && version_compare($phpVersion[1], PHP_VERSION, '<')) {
124+
if (preg_match('{\^((\d++\.)\d++)[\d\.]*$}', $info['requires']['php'], $phpVersion) && version_compare($phpVersion[2].'99', PHP_VERSION, '<')) {
125125
$passthruOrFail("$COMPOSER config platform.php \"$phpVersion[1].99\"");
126126
} else {
127127
$passthruOrFail("$COMPOSER config --unset platform.php");

0 commit comments

Comments
 (0)