Skip to content

[Console] Added a note about the behavior of the command question helper #16978

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

Closed

Conversation

astepin
Copy link

@astepin astepin commented Jul 13, 2022

While checking this open issue (symfony/symfony#39946), I noticed that the behavior is correct and a bug was fixed with Symfony 5.1.9.

However, from my point of view, the necessary help was missing in the documentation, which I have added here.

If the change is accepted like this, the other Symfony issue can be closed as well.

For some background on this situation, it's worth reading through the comments here: symfony/symfony#38991

@carsonbot
Copy link
Collaborator

It looks like you unchecked the "Allow edits from maintainer" box. That is fine, but please note that if you have multiple commits, you'll need to squash your commits into one before this can be merged. Or, you can check the "Allow edits from maintainers" box and the maintainer can squash for you.

Cheers!

Carsonbot

Copy link
Contributor

@HeahDude HeahDude left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@astepin astepin force-pushed the fix_39946_custom_question_style branch 2 times, most recently from 609a5be to 02aa11f Compare July 16, 2022 15:50
@astepin astepin force-pushed the fix_39946_custom_question_style branch from 02aa11f to c63fafe Compare July 16, 2022 15:51
@javiereguiluz
Copy link
Member

Thanks @astepin for this contribution. Sadly, after reading it several times, I still can't understand he exact problem and the proposed solution. Could anyone please explain it to me to see if we can reword it a bit to make it more clear? Another possible solution is that this text is clear already and I'm a bit obtuse today 😝 Tell me that too if that's the case. Cheers!

@javiereguiluz
Copy link
Member

I've reviewed this again and I'm afraid I still don't fully understand it. so, I'll let @OskarStark or @wouterj to review and merge this if they can. Thanks 🙏

@wouterj
Copy link
Member

wouterj commented Oct 6, 2022

Hi @astepin! It is true that interactive output is written to stderr (instead of stdout).

The default console output shipped by Symfony takes care of assigning the same output formatters to both stdout and stderr output (in both constructor and setter). So if I'm correct, the situation added in this PR only applies when you implement your own console output class.

If that is the case, I would say that this is too much of an advanced topic to put in our documentation - which is focused more on the people that aren't familiar with digging through the Symfony code. The topic requires too much implementation knowledge to explain in a single sentence, and spending more than one sentence on this is likely to confuse the 90% of the readers that aren't doing this advanced stuff.

I hope you can understand. If any of my assumptions here are incorrect, please tell us - we can always hit the reopen button on this PR.

@wouterj wouterj closed this Oct 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants