Skip to content

Fix console output styling that broke in Symfony 8#785

Merged
damiani merged 1 commit into
mainfrom
kdd/console-styling-fix
May 21, 2026
Merged

Fix console output styling that broke in Symfony 8#785
damiani merged 1 commit into
mainfrom
kdd/console-styling-fix

Conversation

@damiani

@damiani damiani commented May 21, 2026

Copy link
Copy Markdown
Contributor

A change in Symfony 8, which we added support for in v1.8.6, caused styling tags to be output literally to the console.

  • In Symfony Console 7, overwrite() always clears the section and calls writeln(), which runs text through the formatter.
  • In Symfony Console 8, when the section already has content and output is decorated, overwrite() follows a different path: it stores the raw string in the section buffer and writes it with parent::doWrite() without going through Output::write(), bypassing the formatter.

To solve this, this PR preformats text sections before sending them to overwrite().

@damiani damiani merged commit cf64e67 into main May 21, 2026
5 checks passed
@damiani damiani deleted the kdd/console-styling-fix branch May 21, 2026 20:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant