From 8bab09e668ff5cd0313839f486e1d0abf833ae58 Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Tue, 3 Jan 2017 08:45:23 +0100 Subject: [PATCH] [PhpUnitBridge] Set COMPOSER_ROOT_VERSION while installing --- src/Symfony/Bridge/PhpUnit/bin/simple-phpunit | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Symfony/Bridge/PhpUnit/bin/simple-phpunit b/src/Symfony/Bridge/PhpUnit/bin/simple-phpunit index a832b68b48..f59b964e1d 100755 --- a/src/Symfony/Bridge/PhpUnit/bin/simple-phpunit +++ b/src/Symfony/Bridge/PhpUnit/bin/simple-phpunit @@ -48,12 +48,15 @@ if (!file_exists("$PHPUNIT_DIR/phpunit-$PHPUNIT_VERSION/phpunit") || md5_file(__ $zip->extractTo(getcwd()); $zip->close(); chdir("phpunit-$PHPUNIT_VERSION"); + $prevRoot = getenv('COMPOSER_ROOT_VERSION'); + putenv("COMPOSER_ROOT_VERSION=$PHPUNIT_VERSION"); passthru("$COMPOSER remove --no-update ".(getenv('SYMFONY_PHPUNIT_REMOVE') ?: 'phpspec/prophecy symfony/yaml')); if (5.1 <= $PHPUNIT_VERSION && $PHPUNIT_VERSION < 5.4) { passthru("$COMPOSER require --no-update phpunit/phpunit-mock-objects \"~3.1.0\""); } passthru("$COMPOSER require --no-update symfony/phpunit-bridge \">=3.2@dev\""); passthru("$COMPOSER install --no-dev --prefer-dist --no-progress --ansi", $exit); + putenv('COMPOSER_ROOT_VERSION'.(false !== $prevRoot ? '='.$prevRoot : '')); if ($exit) { exit($exit); }