Skip to content

Not works a references for associative arrays in the Yaml component #11665

@sorbing

Description

@sorbing

Here is an example yaml-configuration that is not working properly:

my_var:  &MY_VAR   WORKS
node1: { key: *MY_VAR }
node2:
    key: *MY_VAR

I expect that the keys node1 and node2 should be equivalent.
But I get a following result:

[
  "my_var" => "my value",
  "node1" => [
    "key" => "*MY_VAR"
  ],
  "node2" => [
    "key" => "WORKS"
  ],
]

This syntax should work correctly?
I found a several online Yaml parsers (one, two) - they have successfully parse my config.
P.S. Tested on the version symfony/yaml: dev-master#d84b97a

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions