-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
debug:dotenv command doesn't show environment variables #54640
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Please create a reproducer. |
As it's stated in the "steps to reproduce", it happens in any Symfony application and there is no code needed. |
Please keep this kind of emojis for yourself. It's not a place to emphasize your personal feelings about other people comments. Let's focus on the problem. Indeed the env var declared in .env file is missing from However I'm not sure this is wrong. With
Let's wait what other contributors or Core Team members will say. |
I think this behavior is WTF. |
I'm sorry for my English. |
…v (HMRDevil) This PR was merged into the 5.4 branch. Discussion ---------- [Dotenv] show overridden vars too when running debug:dotenv | Q | A | ------------- | --- | Branch? | 5.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Issues | Fix #54640 | License | MIT See #54640 Commits ------- ca2040e show overridden vars too
Symfony version(s) affected
7.0.6
Description
If you have an environment variable set, the
debug:dotenv
command doesn't display it. It doesn't even display the values set in the.env
files.How to reproduce
On any symfony application, define a value in
.env
file. Let's useTEST
as example:Run
php bin/console debug:dotenv
and see that it's correctly displayed.Now run
TEST=other php bin/console debug:dotenv
and see that it's not there anymore.Possible Solution
No response
Additional Context
The command only shows what's in
'SYMFONY_DOTENV_VARS'
. Since the value is now an env var, onDotenv.php:192
it will skip the iteration and it will never be defined in$loadedVars
nor in$_SERVER['SYMFONY_DOTENV_VARS']
.The text was updated successfully, but these errors were encountered: