-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
Closed
Labels
Description
Q | A |
---|---|
Bug report? | yes |
Feature request? | no |
BC Break report? | no |
RFC? | no |
Symfony version | 3.2.8 |
Since release 3.2.8 Yaml references across imports do not work anymore and fail with:
Reference "my.reference.from.file1" does not exist at line 1 (nea
r "test.in.file2: *my.reference.from.file1").
This probably was introduced with #22351 by @xabbuh
Test Scenario
file1.yml
vars:
foo: &my.reference.from.file1
baz: foobar
file2.yml
othervars:
zigzag: *my.reference.from.file1
config.yml
imports:
- { resource: "./file1.yml" }
- { resource: "./file2.yml" }
I suppose the YamlFileLoader calls the Parser->parse() on every import and since the $this->refs array is resetted in parse() the references are missing on 2nd parse run.
Symfony/Component/DependencyInjection/Loader/YamlFileLoader.php:396
Imports are not part of the YAML spec afaik, so the bug might rather be a part of the YamlFileLoader.