Skip to content

Commit 955efcd

Browse files
[PhpUnitBridge] Set COMPOSER_ROOT_VERSION while installing
1 parent 8c2a67f commit 955efcd

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/Symfony/Bridge/PhpUnit/bin/simple-phpunit

+5
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,17 @@ if (!file_exists("$PHPUNIT_DIR/phpunit-$PHPUNIT_VERSION/phpunit") || md5_file(__
4848
$zip->extractTo(getcwd());
4949
$zip->close();
5050
chdir("phpunit-$PHPUNIT_VERSION");
51+
$prevRoot = getenv('COMPOSER_ROOT_VERSION');
52+
putenv("COMPOSER_ROOT_VERSION=$PHPUNIT_VERSION");
5153
passthru("$COMPOSER remove --no-update ".(getenv('SYMFONY_PHPUNIT_REMOVE') ?: 'phpspec/prophecy symfony/yaml'));
5254
if (5.1 <= $PHPUNIT_VERSION && $PHPUNIT_VERSION < 5.4) {
5355
passthru("$COMPOSER require --no-update phpunit/phpunit-mock-objects \"~3.1.0\"");
5456
}
5557
passthru("$COMPOSER require --no-update symfony/phpunit-bridge \">=3.2@dev\"");
5658
passthru("$COMPOSER install --no-dev --prefer-dist --no-progress --ansi", $exit);
59+
putenv('COMPOSER_ROOT_VERSION'.(false !== $prevRoot ? '='.$prevRoot : ''));
60+
if (false === $prevRootVersion) {
61+
}
5762
if ($exit) {
5863
exit($exit);
5964
}

0 commit comments

Comments
 (0)