-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Dotenv] Variable filter added to debug command #46502
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like this feature. It's consistent with debug:container
and debug:router
that allows filtering with an optional argument.
973fee1
to
f501856
Compare
f501856
to
89f34a7
Compare
P.S. added filtering not only by exact value, but by prefix as well. For example if there are more than one variable with same prefix in the name - it will be possible to filter by prefix and get all values with that prefix:) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the completion and tests.
I tested the command and I think a message should be displayed when none of the variables starts with the given name.
89f34a7
to
bf4036e
Compare
bf4036e
to
c3f09e6
Compare
af5e53c
to
6e6cd83
Compare
@fabpot updated, based on comments. The failing pipeline does not relate with my changes (except for the low-deps of 8.1 which is due to dependency of 5.4 symfony components) |
6e6cd83
to
d41e7a1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd be glad if this feature was approved.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2 small changes before we can merge.
|
||
<info>php %command.full_name%</info> | ||
|
||
To get specific variable, specify its name: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, it can be the env name or part of the name, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated with clarification: To get specific variable, specify its full or partial name:
d41e7a1
to
a754669
Compare
Thank you @rmikalkenas. |
@rmikalkenas The |
@chalasr thanks for informing! Sounds weird.. Will take a look! |
…obal state (rmikalkenas) This PR was merged into the 6.2 branch. Discussion ---------- [Dotenv] Run test in a separate process to have clean global state | Q | A | ------------- | --- | Branch? | 6.2 | Bug fix? | no | New feature? | no | Deprecations? | no | Tickets | Fix #... | License | MIT | Doc PR | symfony/symfony-docs#... A fix to comment: #46502 (comment) cc @chalasr Commits ------- be3782c [Dotenv] Run test in a separate process to have clean global state
For applications that use many environment variables there is no way to efficiently filter a single variable. Of course there is always a
grep
command, but with it you are loosing part of the information that symfony debug command provides.Added a new
name
argument to the command, to be able to filter debug output by variable's name