Closed
Description
Symfony version(s) affected: 3.* & 4.*
Description
If --
is used in the command line of the bin/console
script the Kernel
's environment doesn't get set.
How to reproduce
$ composer create-project --no-interaction symfony/framework-standard-edition 3.4 '3.4.*'
(...)
$ 3.4/bin/console --
In FileLocator.php line 44:
The file "/tmp/3.4/app/config/config_.yml" does not exist.
I could expect bin/console --
to work exactly the same as bin/console
and execute the list
sub-command.
Symfony 4 doesn't produce a fatal error, however the Kernel
's environment still isn't set correctly:
$ composer create-project --no-interaction symfony/skeleton 4.1 '4.1.*'
(...)
$ 4.1/bin/console --
Symfony 4.1.1 (kernel: src, env: , debug: true)
Usage:
(...)
Note the empty env:
.
This leads to silent bugs with for example several of the Kernel's directories pointing to wrong locations.
Possible Solution
It looks like ArgvInput::getParameterOption()
is called in bin/console
with a default value, which however is seemingly ignored.
Pull request incoming...