Closed
Description
Symfony version(s) affected: 5.2
Description
When the environment (either when passing it with --env
in CLI, or the APP_ENV env variable), is an empty string, a hard to debug error comes up:
In BaseNode.php line 340:
Configuration path "security.access_control" cannot be overwritten. You have to define all options for this path, and any of its sub-paths in one configuration section.
How to reproduce
On a fresh symfony project run:
bin/console --env=''
When a non existing environment is provided, everything works 'normally'. The error only occurs if the environment is empty. e.g.
bin/console --env='foo'
Possible Solution
Detect an empty environment as a bug, and report it to the user.