Skip to content

Bug of end of line using Yaml::dump #33464

@abonne01

Description

@abonne01

Symfony version(s) affected: 4.3.4
Description
Following correction of bug #32251 (thanks @nicolas-grekas) there is a problem with yaml::dump function when using Tagged value and inline parameter

How to reproduce

    $rootYaml[] = new TaggedValue('group', 'admin');
    $rootYaml[] = new TaggedValue('group', 'admin2');
    $admin = array(
        'role' => new TaggedValue('group', 'admin'),
        'privileges' => array('read', 'create', 'update'),
        'resource' => new TaggedValue('policy', 'root')
    );
    $rootYaml[] = new TaggedValue('permit', $admin);

    $value = Yaml::dump($rootYaml, 3);
    print_r($value);
    

result

- !group
  admin- !group
  admin2- !permit
  role: !group
      admin  privileges:
      - read
      - create
      - update
  resource: !policy
      root

expected result

- !group admin
- !group admin2
- !permit
  role: !group admin  
  privileges:
      - read
      - create
      - update
  resource: !policy root

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

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy