Skip to content

Commit 45210b5

Browse files
Merge branch '5.1'
* 5.1: [PhpUnitBridge] fix installing on PHP 8 (ter) [PhpUnitBridge] fix installing on PHP 8 (bis) [PhpUnitBridge] fix installing on PHP 8
2 parents 57c5276 + 31e3fab commit 45210b5

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

bin/simple-phpunit.php

Lines changed: 3 additions & 1 deletion
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)