Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
[Dotenv]: search variable values in _ENV first then env file #32943
I think we must searhing the value of variables in $_ENV before the .env file to fix this issues.
In my .env file, I have a variable TEST that depends on the APP_ENV variable like this:
I run composer dump-env dev command to generate my .env.locale.php, everything works fine, the value of my variable TEST is correct.
Then I run the same command with prod environment (composer dump-env prod), the value of TEST is wrong (it is same as for dev)