-
-
Notifications
You must be signed in to change notification settings - Fork 9.8k
[Console] Restore SHELL_VERBOSITY after a command is ran
#61033
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SHELL_VERBOSITY after a command is ran
welcoMattic
reviewed
Jul 4, 2025
welcoMattic
approved these changes
Jul 4, 2025
GromNaN
requested changes
Jul 4, 2025
Member
Author
Member
|
Looks good. Can you think of a test case that would help avoiding regressions? |
Member
Author
|
I added tests + rebased + targeted branch 7.3 |
Member
|
👍 push needed to re-trigger the pipeline |
d53e95b to
3531989
Compare
Member
Author
|
All green 🎉 Thanks for the review |
GromNaN
approved these changes
Aug 7, 2025
chalasr
approved these changes
Aug 7, 2025
fabpot
approved these changes
Aug 23, 2025
Member
|
Thank you @lyrixx. |
Merged
nicolas-grekas
added a commit
that referenced
this pull request
Oct 14, 2025
…erly (ttskch) This PR was merged into the 7.3 branch. Discussion ---------- [Console] Ensure `SHELL_VERBOSITY` is always restored properly | Q | A | ------------- | --- | Branch? | 7.3 | Bug fix? | yes | New feature? | no | Deprecations? | no | Issues | Related to #61033 | License | MIT There was a bug where if only `$_SERVER['SHELL_VERBOSITY']` or `$_ENV['SHELL_VERBOSITY']` had a value, they would be erroneously unset after command execution. For example, in [PHPUnit's default configuration](https://github.com/symfony/recipes/blob/main/phpunit/phpunit/11.1/phpunit.dist.xml#L17), `SHELL_VERBOSITY` is set only to `$_SERVER['SHELL_VERBOSITY']`. This caused the `SHELL_VERBOSITY` setting to be invalid after [a console command was executed internally](https://github.com/zenstruck/foundry/blob/v2.7.5/src/Test/ResetDatabase.php) using the `ResetDatabase` trait of [zenstruck/foundry](https://github.com/zenstruck/foundry). Commits ------- 8da524e [Console] ensure `SHELL_VERBOSITY` is always restored properly
9 tasks
JaZo
added a commit
to swisnl/laravel-encrypted-data
that referenced
this pull request
Oct 20, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Considereing the following code:
Without this patch,
Main command executedis. It should be, it's correct. But it's hard to understand. the current $output has already been configured, and it's not silenced by--quietyet