bug #37095 [PhpUnitBridge] Fix undefined index when output of "composer show" cannot be parsed (nicolas-grekas)

This PR was merged into the 3.4 branch.

Discussion
----------

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

…nnot be parsed

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #37086
| License       | MIT
| Doc PR        | -

Commits
-------

d3f9b7f833 [PhpUnitBridge] Fix undefined index when output of "composer show" cannot be parsed
This commit is contained in:
Nicolas Grekas 2020-06-04 12:31:39 +02:00
commit 400ab7c59b
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 {