Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.6k
[Console] Suppressproc_open
errors withinTerminal::readFromProcess
#58332
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
[Console] Suppressproc_open
errors withinTerminal::readFromProcess
#58332
Uh oh!
There was an error while loading.Please reload this page.
Conversation
carsonbot commentedSep 20, 2024
Hey! Thanks for your PR. You are targeting branch "7.2" but it seems your PR description refers to branch "5.4". Cheers! Carsonbot |
Instead of using |
Thank you@fritzmg. |
2be812d
intosymfony:5.4Uh oh!
There was an error while loading.Please reload this page.
fritzmg commentedSep 28, 2024 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
@nicolas-grekas should I do a separate PR for Symfony 6, as the code is different there? |
@fritzmg I think merging |
Ah yes, all good 👍 |
Uh oh!
There was an error while loading.Please reload this page.
When instantiating
SymfonyStyle
in a command it will try to determine the maximum width of the current console interface.symfony/src/Symfony/Component/Console/Style/SymfonyStyle.php
Line 53 in6687e4e
This will execute
stty -a | grep columns
down the line. Access tostty
might be disallowed however, resulting in the following error:(Stack Trace actually from Symfony 6)
The phpDoc of
Terminal::getSttyColumns
statesThe latter might refer to
['suppress_errors' => true]
(though I am not sure) - which is a Windows only functionality. In any case, sinceTerminal::readFromProcess
already checks forand
upstream in Symfony 6/7, indicating that
proc_open
might fail - this error can additionally be suppressed using@
. Besides,Process::start
also uses@proc_open
(added in099481f "Prevent warning in proc_open()").