You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description
The Yaml component is able to parse scalar bock for tagged values:
foo: !bar| foo another line
If parse the above YAML string you will get the expected TaggedValue containing the string with line breaks, amazing!
However if you try to dump a PHP value to this YAML string you are not getting the intended output but the following:
foo: !bar "foo\nanother line"
And that's because the parsing tag Yaml::DUMP_MULTI_LINE_LITERAL_BLOCK isn't used for tagged value.
How to reproduce
Try to dump a PHP value containing a TaggedValue with a string with line breaks as a value while the tag Yaml::DUMP_MULTI_LINE_LITERAL_BLOCK is passed.
Symfony version(s) affected: 3.4 to latest
Description
The Yaml component is able to parse scalar bock for tagged values:
If parse the above YAML string you will get the expected
TaggedValue
containing the string with line breaks, amazing!However if you try to dump a PHP value to this YAML string you are not getting the intended output but the following:
And that's because the parsing tag
Yaml::DUMP_MULTI_LINE_LITERAL_BLOCK
isn't used for tagged value.How to reproduce
Try to dump a PHP value containing a
TaggedValue
with a string with line breaks as a value while the tagYaml::DUMP_MULTI_LINE_LITERAL_BLOCK
is passed.Possible Solution
If this is identified as a legit issue, I've created a PR to fix it. #34449
The text was updated successfully, but these errors were encountered: