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);
Additional Context
No response
The text was updated successfully, but these errors were encountered:
…otenv:dump (scruwi)
This PR was merged into the 6.4 branch.
Discussion
----------
[Dotenv] Specify envKey while loading variables with the dotenv:dump
| Q | A
| ------------- | ---
| Branch? | 6.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Issues | Fix#53864
| License | MIT
`bin/console dotenv:dump` incorrectly detected envKey if it differs from APP_ENV
Commits
-------
f188a24 [Dotenv] Specify envKey while loading variables with the dotenv:dump command
Symfony version(s) affected
6.4
Description
If
env_var_name
incomposer.json
differs from the standardAPP_ENV
, then.env.PRODUCTION
file will be ignored by the commandbin/console dotenv:dump PRODUCTION
How to reproduce
composer.json:
Create files:
Run
bin/console dotenv:dump PRODUCTION
Possible Solution
Method
DotenvDumpCommand::loadEnv()
, instantiateDotEnv
with correctenvKey
:Additional Context
No response
The text was updated successfully, but these errors were encountered: