8000 bug #26170 [PHPUnit bridge] Avoid running the remove command without … · mssimi/symfony@0f4704d · GitHub
[go: up one dir, main page]

Skip to content

Commit 0f4704d

Browse files
bug symfony#26170 [PHPUnit bridge] Avoid running the remove command without any packages (stof)
This PR was merged into the 3.4 branch. Discussion ---------- [PHPUnit bridge] Avoid running the remove command without any packages | Q | A | ------------- | --- | Branch? | 3.4 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes/no | Fixed tickets | n/a | License | MIT | Doc PR | n/a 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 does not apply to versions older than 3.4, as it was impossible to set `SYMFONY_PHPUNIT_REMOVE` to an empty string before (it was applying the default removing rules instead in such case) Commits ------- 34d2781 Avoid running the remove command without any packages
2 parents 01ccae8 + 34d2781 commit 0f4704d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,9 @@ if (!file_exists("$PHPUNIT_DIR/phpunit-$PHPUNIT_VERSION/phpunit") || md5_file(__
7777
$zip->extractTo(getcwd());
7878
$zip->close();
7979
chdir("phpunit-$PHPUNIT_VERSION");
80-
passthru("$COMPOSER remove --no-update ".$SYMFONY_PHPUNIT_REMOVE);
80+
if ($SYMFONY_PHPUNIT_REMOVE) {
81+
passthru("$COMPOSER remove --no-update ".$SYMFONY_PHPUNIT_REMOVE);
82+
}
8183
if (5.1 <= $PHPUNIT_VERSION && $PHPUNIT_VERSION < 5.4) {
8284
passthru("$COMPOSER require --no-update phpunit/phpunit-mock-objects \"~3.1.0\"");
8385
}

0 commit comments

Comments
 (0)
0