Skip to content

Commit c25cb04

Browse files
Merge branch '3.4' into 4.4
* 3.4: [PhpUnitBridge] fix installing on PHP 8 (ter) [PhpUnitBridge] fix installing on PHP 8 (bis)
2 parents 18bf857 + 392eff4 commit c25cb04

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

bin/simple-phpunit.php

+3-1
Original file line numberDiff line numberDiff line change
@@ -197,8 +197,10 @@
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)) {
200+
if (preg_match('{\^(\d++\.\d++)[\d\.]*$}', $info['requires']['php'], $phpVersion) && version_compare($phpVersion[1], PHP_VERSION, '<')) {
201201
$passthruOrFail("$COMPOSER config platform.php \"$phpVersion[1].99\"");
202+
} else {
203+
$passthruOrFail("$COMPOSER config --unset platform.php");
202204
}
203205
if (file_exists($path = $root.'/vendor/symfony/phpunit-bridge')) {
204206
$passthruOrFail("$COMPOSER require --no-update symfony/phpunit-bridge \"*@dev\"");

0 commit comments

Comments
 (0)