Avoid running the remove command without any packages

As the exit code of the command was not checked, the failure was not
breaking things, but it was still printing a confusing error message.
This commit is contained in:
Christophe Coevoet 2018-02-13 18:35:53 +01:00
parent 01ccae828c
commit 34d27817d4

View File

@ -77,7 +77,9 @@ if (!file_exists("$PHPUNIT_DIR/phpunit-$PHPUNIT_VERSION/phpunit") || md5_file(__
$zip->extractTo(getcwd());
$zip->close();
chdir("phpunit-$PHPUNIT_VERSION");
passthru("$COMPOSER remove --no-update ".$SYMFONY_PHPUNIT_REMOVE);
if ($SYMFONY_PHPUNIT_REMOVE) {
passthru("$COMPOSER remove --no-update ".$SYMFONY_PHPUNIT_REMOVE);
}
if (5.1 <= $PHPUNIT_VERSION && $PHPUNIT_VERSION < 5.4) {
passthru("$COMPOSER require --no-update phpunit/phpunit-mock-objects \"~3.1.0\"");
}