Skip to content

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