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

[Messenger] Fix commands writing toSTDERR instead ofSTDOUT#62171

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

Conversation

@wazum
Copy link
Contributor

QA
Branch?6.4
Bug fix?yes
New feature?no
Deprecations?no
IssuesFix#60822
LicenseMIT

Fixes Messenger commands incorrectly routing all output to STDERR, preventing proper piping and redirection of structured data.

Updated commands to follow the established Symfony pattern (e.g.,TranslationUpdateCommand,ContainerLintCommand):

  • Create$io = new SymfonyStyle($input, $output) for primary output →STDOUT
  • Create$errorIo = $io->getErrorStyle() for diagnostics →STDERR

STDOUT (parseable data):

  • Tables (message lists, statistics)
  • Counts ("There are X messages pending")
  • Success messages
  • Structured output

STDERR (supplementary info):

  • Errors and warnings
  • Informational comments/hints
  • Interactive prompts and confirmations

{
$errorIo ??= $io->getErrorStyle();

Choose a reason for hiding this comment

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

since$errorIo is always derived from$io->getErrorStyle(), I'd rather remove all the extra arguments added to method. That'd work, isn't it?

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

@nicolas-grekas that would work, but creates new instances. Just tell me what you prefer, and I'll adjust the code accordingly. Thanks for the feedback.

nicolas-grekas reacted with thumbs up emoji
@OskarStarkOskarStark changed the title[Messenger] Fix commands writing to STDERR instead of STDOUT[Messenger] Fix commands writing toSTDERR instead ofSTDOUTNov 5, 2025
Messenger commands were using getErrorOutput() for all output, causingstructured data (tables, messages) to go to STDERR instead of STDOUT.Fixessymfony#60822
@nicolas-grekasnicolas-grekasforce-pushed thebugfix/messenger-commands-stderr-60822 branch frome1318d2 to8c52eddCompareNovember 6, 2025 11:00
@nicolas-grekas
Copy link
Member

Thank you@wazum.

@nicolas-grekasnicolas-grekas merged commit4116def intosymfony:6.4Nov 6, 2025
8 of 11 checks passed
This was referencedNov 6, 2025
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@nicolas-grekasnicolas-grekasnicolas-grekas approved these changes

Assignees

No one assigned

Projects

None yet

Milestone

6.4

Development

Successfully merging this pull request may close these issues.

3 participants

@wazum@nicolas-grekas@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp