[PhpUnitBridge] Fix undefined index when output of "composer show" cannot be parsed

This commit is contained in:
Nicolas Grekas 2020-06-04 12:27:56 +02:00
parent edd0065c77
commit d3f9b7f833
1 changed files with 5 additions and 0 deletions

View File

@ -106,6 +106,11 @@ if (!file_exists("$PHPUNIT_DIR/phpunit-$PHPUNIT_VERSION/phpunit") || md5_file(__
}
}
$info += [
'versions' => [],
'requires' => ['php' => '*'],
];
if (1 === \count($info['versions'])) {
$passthruOrFail("$COMPOSER create-project --ignore-platform-reqs --no-install --prefer-dist --no-scripts --no-plugins --no-progress --ansi -s dev phpunit/phpunit phpunit-$PHPUNIT_VERSION \"$PHPUNIT_VERSION.*\"");
} else {