Skip to content

[Console] Fix console closing tag #39168

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 1 commit into from
Nov 25, 2020
Merged

[Console] Fix console closing tag #39168

merged 1 commit into from
Nov 25, 2020

Conversation

jderusse
Copy link
Member

Q A
Branch? 4.4
Bug fix? yes
New feature? no
Deprecations? no
Tickets -
License MIT
Doc PR -

When using SymfonyStyle, in some cases, closing a tag, is called twice.
In the following code <question>do you want <comment>something</>?</> the first </> close both the comment and the question tags.

Screenshot from 2020-11-25 01-21-06

The reason is, part of the content is sent in 2 Outputs (see #39160 for another issue), and both outputs share the same $styleStack.
This PR updates the OutputFormatter::__clone method to prevent sharing the same state.

@fabpot
Copy link
Member

fabpot commented Nov 25, 2020

Thank you @jderusse.

@fabpot fabpot merged commit 4c378d4 into symfony:4.4 Nov 25, 2020
This was referenced Nov 29, 2020
@jderusse jderusse deleted the fix-console branch December 9, 2020 22:10
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.

3 participants