You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If env_var_name in composer.json differs from the standard APP_ENV, then .env.PRODUCTION file will be ignored by the command bin/console dotenv:dump PRODUCTION
How to reproduce
composer.json:
"extra": {
"runtime": {
"env_var_name": "ENV"
}
}
Create files:
.env
.env.local
.env.local.PRODUCTION
Run bin/console dotenv:dump PRODUCTION
Possible Solution
Method DotenvDumpCommand::loadEnv(), instantiate DotEnv with correct envKey:
$envKey = $config['env_var_name'] ?? 'APP_ENV';
$dotenv = new Dotenv($envKey);