Closed
Description
Q | A |
---|---|
Bug report? | yes |
Feature request? | no |
BC Break report? | no |
RFC? | no |
Symfony version | all |
In other YAML implementations, it is possible to define a reference on a merge key, e.g. as follows:
root:
mergekeyrefdef:
a: foo
<<: &quux
b: bar
c: baz
mergekeyderef:
d: quux
<<: *quux
This should be parsed as the following data structure:
array(
'mergekeyrefdef' => array('a' => 'foo', 'b' => 'bar', 'c' => 'baz'),
'mergekeyderef' => array('d' => 'quux', 'b' => 'bar', 'c' => 'baz')
)
However, in all Symfony versions, this emits the following error:
Symfony\Component\Yaml\Exception\ParseException: YAML merge keys used with a scalar value instead of an array at line 4 (near "<<: &quux").