Skip to content

Commit

Permalink
[PhpUnitBridge] fix setting platform.php
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolas-grekas committed May 21, 2020
1 parent 392eff4 commit f926812
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bin/simple-phpunit
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down

0 comments on commit f926812

Please sign in to comment.