Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
fabpot merged 1 commit intosymfony:6.2fromrmikalkenas:ability-debug-single-env
Jul 20, 2022

Conversation

@rmikalkenas
Copy link
Contributor

@rmikalkenasrmikalkenas commentedMay 30, 2022
edited
Loading

QA
Branch?6.2
Bug fix?no
New feature?yes
Deprecations?no
Tickets-
LicenseMIT
Doc PRWill prepare on implementation approval

For applications that use many environment variables there is no way to efficiently filter a single variable. Of course there is always agrep command, but with it you are loosing part of the information that symfony debug command provides.
Added a newname argument to the command, to be able to filter debug output by variable's name

Copy link
Member

@GromNaNGromNaN left a 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 withdebug:container anddebug:router that allows filtering with an optional argument.

@rmikalkenasrmikalkenasforce-pushed theability-debug-single-env branch 2 times, most recently from973fee1 tof501856CompareMay 30, 2022 17:45
@rmikalkenas
Copy link
ContributorAuthor

@GromNaN@94noni thanks for the comments, adjusted the code based on it

@rmikalkenas
Copy link
ContributorAuthor

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:)

Copy link
Member

@GromNaNGromNaN left a 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.

@rmikalkenas
Copy link
ContributorAuthor

rmikalkenas commentedJun 3, 2022
edited
Loading

@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)

@rmikalkenasrmikalkenasforce-pushed theability-debug-single-env branch from6e6cd83 tod41e7a1CompareJune 23, 2022 12:32
Copy link
Member

@GromNaNGromNaN left a 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.

Copy link
Member

@fabpotfabpot left a 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:
Copy link
Member

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?

Copy link
ContributorAuthor

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:

@rmikalkenasrmikalkenasforce-pushed theability-debug-single-env branch fromd41e7a1 toa754669CompareJuly 18, 2022 12:26
@fabpot
Copy link
Member

Thank you@rmikalkenas.

@fabpotfabpot merged commitca4615a intosymfony:6.2Jul 20, 2022
@rmikalkenasrmikalkenas deleted the ability-debug-single-env branchJuly 20, 2022 10:38
@chalasr
Copy link
Member

chalasr commentedJul 20, 2022
edited
Loading

@rmikalkenas ThetestCompletion test added by this PR is failing under certain circumstances. Would you mind having a look?
To reproduce locally:
./phpunit src/Symfony/Component/Dotenv --filter testCompletion (all green when running the whole DebugCommandTest 🤷 )

@rmikalkenas
Copy link
ContributorAuthor

@rmikalkenas ThetestCompletion test added by this PR is failing under certain circumstances. Would you mind having a look? To reproduce locally:./phpunit src/Symfony/Component/Dotenv --filter testCompletion (all green when running the whole DebugCommandTest shrug )

@chalasr thanks for informing! Sounds weird.. Will take a look!

chalasr reacted with rocket emoji

fabpot added a commit that referenced this pull requestJul 22, 2022
…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@chalasrCommits-------be3782c [Dotenv] Run test in a separate process to have clean global state
@fabpotfabpot mentioned this pull requestOct 24, 2022
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@GromNaNGromNaNGromNaN approved these changes

@fabpotfabpotfabpot approved these changes

+1 more reviewer

@94noni94noni94noni approved these changes

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Projects

None yet

Milestone

6.2

Development

Successfully merging this pull request may close these issues.

6 participants

@rmikalkenas@fabpot@chalasr@GromNaN@94noni@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp