Fix checks for phpunit releases on Composer 2 (resolves #37601)
This commit is contained in:
parent
a397c490b0
commit
2bb3f08fba
@ -117,7 +117,11 @@ if (!file_exists("$PHPUNIT_DIR/phpunit-$PHPUNIT_VERSION/phpunit") || md5_file(__
|
|||||||
'requires' => array('php' => '*'),
|
'requires' => array('php' => '*'),
|
||||||
);
|
);
|
||||||
|
|
||||||
if (1 === count($info['versions'])) {
|
$stableVersions = array_filter($info['versions'], function($v) {
|
||||||
|
return !preg_match('/-dev$|^dev-/', $v);
|
||||||
|
});
|
||||||
|
|
||||||
|
if (!$stableVersions) {
|
||||||
$passthruOrFail("$COMPOSER create-project --ignore-platform-reqs --no-install --prefer-dist --no-scripts --no-plugins --no-progress -s dev phpunit/phpunit phpunit-$PHPUNIT_VERSION \"$PHPUNIT_VERSION.*\"");
|
$passthruOrFail("$COMPOSER create-project --ignore-platform-reqs --no-install --prefer-dist --no-scripts --no-plugins --no-progress -s dev phpunit/phpunit phpunit-$PHPUNIT_VERSION \"$PHPUNIT_VERSION.*\"");
|
||||||
} else {
|
} else {
|
||||||
$passthruOrFail("$COMPOSER create-project --ignore-platform-reqs --no-install --prefer-dist --no-scripts --no-plugins --no-progress phpunit/phpunit phpunit-$PHPUNIT_VERSION \"$PHPUNIT_VERSION.*\"");
|
$passthruOrFail("$COMPOSER create-project --ignore-platform-reqs --no-install --prefer-dist --no-scripts --no-plugins --no-progress phpunit/phpunit phpunit-$PHPUNIT_VERSION \"$PHPUNIT_VERSION.*\"");
|
||||||
|
Reference in New Issue
Block a user