[PhpUnitBridge] Set COMPOSER_ROOT_VERSION while installing
This commit is contained in:
parent
8c2a67f561
commit
8bab09e668
@ -48,12 +48,15 @@ if (!file_exists("$PHPUNIT_DIR/phpunit-$PHPUNIT_VERSION/phpunit") || md5_file(__
|
|||||||
$zip->extractTo(getcwd());
|
$zip->extractTo(getcwd());
|
||||||
$zip->close();
|
$zip->close();
|
||||||
chdir("phpunit-$PHPUNIT_VERSION");
|
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'));
|
passthru("$COMPOSER remove --no-update ".(getenv('SYMFONY_PHPUNIT_REMOVE') ?: 'phpspec/prophecy symfony/yaml'));
|
||||||
if (5.1 <= $PHPUNIT_VERSION && $PHPUNIT_VERSION < 5.4) {
|
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 phpunit/phpunit-mock-objects \"~3.1.0\"");
|
||||||
}
|
}
|
||||||
passthru("$COMPOSER require --no-update symfony/phpunit-bridge \">=3.2@dev\"");
|
passthru("$COMPOSER require --no-update symfony/phpunit-bridge \">=3.2@dev\"");
|
||||||
passthru("$COMPOSER install --no-dev --prefer-dist --no-progress --ansi", $exit);
|
passthru("$COMPOSER install --no-dev --prefer-dist --no-progress --ansi", $exit);
|
||||||
|
putenv('COMPOSER_ROOT_VERSION'.(false !== $prevRoot ? '='.$prevRoot : ''));
|
||||||
if ($exit) {
|
if ($exit) {
|
||||||
exit($exit);
|
exit($exit);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user