bug #28284 [PhpUnitBridge] keep compat with composer 1.0 (nicolas-grekas)

This PR was merged into the 3.4 branch.

Discussion
----------

[PhpUnitBridge] keep compat with composer 1.0

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

Remove `--no-suggest` when installing PHPUnit from the bridge to keep compat with composer 1.0, which is shipped with Ubuntu 16.04LTS.

Commits
-------

28492a7bb1 [PhpUnitBridge] keep compat with composer 1.0
This commit is contained in:
Fabien Potencier 2018-08-27 17:39:04 +02:00
commit 2041624286

View File

@ -101,7 +101,8 @@ if (!file_exists("$PHPUNIT_DIR/phpunit-$PHPUNIT_VERSION/phpunit") || md5_file(__
}
$prevRoot = getenv('COMPOSER_ROOT_VERSION');
putenv("COMPOSER_ROOT_VERSION=$PHPUNIT_VERSION.99");
$exit = proc_close(proc_open("$COMPOSER install --no-dev --prefer-dist --no-suggest --no-progress --ansi", array(), $p, getcwd(), null, array('bypass_shell' => true)));
// --no-suggest is not in the list to keep compat with composer 1.0, which is shipped with Ubuntu 16.04LTS
$exit = proc_close(proc_open("$COMPOSER install --no-dev --prefer-dist --no-progress --ansi", array(), $p, getcwd(), null, array('bypass_shell' => true)));
putenv('COMPOSER_ROOT_VERSION'.(false !== $prevRoot ? '='.$prevRoot : ''));
if ($exit) {
exit($exit);