Closed
Description
Symfony version(s) affected: 5.3.0
Description
Whenever using :
<env name="SYMFONY_PHPUNIT_REQUIRE" value="phpspec/prophecy-phpunit"/>
([PhpUnitBridge] Add SYMFONY_PHPUNIT_REQUIRE env variable #40059)- with Composer >= 2.1.0 (Show a warning if require key changes for dependency composer/composer#9542)
- and running
vendor/bin/simple-phpunit
with PHPUnit 9.5 for the first time
you'll get this warning:
phpspec/prophecy-phpunit is currently present in the require-dev key and you ran the command without the --dev flag, which would move it to the require key.
since phpspec/prophecy-phpunit
is in the require-dev section of sebastianbergmann/phpunit
:
Which is not much an issue in most cases, but:
- it'll ask interactively the user about something he doesn't really mind about, since they're just running
simple-phpunit
- in some cases, it can be an issue in a CI env (a workmate originally reported this issue to me because it makes his CI fail (Circle CI) because the interactive shell is not disabled by default).
Possible Solution
What about enforcing simple-phpunit
to run these commands with --no-interaction
?
The issue can already be circumvented, for instance by defining the COMPOSER_BINARY=composer --interactive
env var. But is it worth it to ask anything to the user here?