Skip to content

Commit 7a4a92d

Browse files
committed
skip interactive questions asked by Composer
following #60587 so that the installation script is not blocked by Composer asking to install the bridge as a dev dependency: ``` The package you required is recommended to be placed in require-dev (because it is tagged as "testing") but you did not use --dev. Do you want to re-run the command with --dev? [yes]? ```
1 parent 4eeaef6 commit 7a4a92d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

bin/simple-phpunit.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@
237237
$passthruOrFail("$COMPOSER require --no-update --no-interaction ".$SYMFONY_PHPUNIT_REQUIRE);
238238
}
239239
if (5.1 <= $PHPUNIT_VERSION && $PHPUNIT_VERSION < 5.4) {
240-
$passthruOrFail("$COMPOSER require --no-update phpunit/phpunit-mock-objects \"~3.1.0\"");
240+
$passthruOrFail("$COMPOSER require --no-update --no-interaction phpunit/phpunit-mock-objects \"~3.1.0\"");
241241
}
242242

243243
if (preg_match('{\^((\d++\.)\d++)[\d\.]*$}', $info['requires']['php'], $phpVersion) && version_compare($phpVersion[2].'99', \PHP_VERSION, '<')) {
@@ -253,13 +253,13 @@
253253
if (realpath($p) === realpath($path)) {
254254
$path = $p;
255255
}
256-
$passthruOrFail("$COMPOSER require --no-update symfony/phpunit-bridge \"*@dev\"");
256+
$passthruOrFail("$COMPOSER require --no-update --no-interaction symfony/phpunit-bridge \"*@dev\"");
257257
$passthruOrFail("$COMPOSER config repositories.phpunit-bridge path ".escapeshellarg(str_replace('/', \DIRECTORY_SEPARATOR, $path)));
258258
if ('\\' === \DIRECTORY_SEPARATOR) {
259259
file_put_contents('composer.json', preg_replace('/^( {8})"phpunit-bridge": \{$/m', "$0\n$1 ".'"options": {"symlink": false},', file_get_contents('composer.json')));
260260
}
261261
} else {
262-
$passthruOrFail("$COMPOSER require --no-update symfony/phpunit-bridge \"*\"");
262+
$passthruOrFail("$COMPOSER require --no-update --no-interaction symfony/phpunit-bridge \"*\"");
263263
}
264264
$prevRoot = getenv('COMPOSER_ROOT_VERSION');
265265
putenv("COMPOSER_ROOT_VERSION=$PHPUNIT_VERSION.99");

0 commit comments

Comments
 (0)