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

Appearance settings

Yaml::DUMP_MULTI_LINE_LITERAL_BLOCK breaks dump #25842

Copy link
Copy link
Closed
@geek-merlin

Description

@geek-merlin
Issue body actions
Q A
Bug report? yes
Feature request? no
BC Break report? no
RFC? no
Symfony version 3.2.8 (but should be same as current)

I stepped up to leverage Yaml::DUMP_MULTI_LINE_LITERAL_BLOCK to make Drupal config dumps more diff-friendly.

Unfortunately special chars, especially "\r" are not round-tripping. Did not test other cars yet.
Tested with (drupals current) 3.2.8, but commit history does not indicate a relevant change since then.

A manual test:

$ drush ev 'print json_encode(\Symfony\Component\Yaml\Yaml::parse(\Symfony\Component\Yaml\Yaml::dump(["a\r\nb"]))) . "\n";'
["a\r\nb"]
$ drush ev 'print json_encode(\Symfony\Component\Yaml\Yaml::parse(\Symfony\Component\Yaml\Yaml::dump(["a\r\nb"],2,4, \Symfony\Component\Yaml\Yaml::DUMP_MULTI_LINE_LITERAL_BLOCK))) . "\n";'
["a\nb\n"]

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.