Skip to content

Commit 004bf7b

Browse files
Merge branch '3.4' into 4.4
* 3.4: [PhpUnitBridge] fix setting platform.php
2 parents f5c37f6 + f926812 commit 004bf7b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bin/simple-phpunit.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@
197197
$passthruOrFail("$COMPOSER require --no-update phpunit/phpunit-mock-objects \"~3.1.0\"");
198198
}
199199

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

0 commit comments

Comments
 (0)