[DependencyInjection] Fixes a loading order issue
ab7ad4808b
introduced a regression when using a parameter in an extension config that is defined in the same file, the ParameterBag can not resolve it
This commit is contained in:
parent
84c7496565
commit
ac7e0bc35f
@ -44,12 +44,12 @@ class XmlFileLoader extends FileLoader
|
||||
// imports
|
||||
$this->parseImports($xml, $file);
|
||||
|
||||
// extensions
|
||||
$this->loadFromExtensions($xml);
|
||||
|
||||
// parameters
|
||||
$this->parseParameters($xml, $file);
|
||||
|
||||
// extensions
|
||||
$this->loadFromExtensions($xml);
|
||||
|
||||
// interface injectors
|
||||
$this->parseInterfaceInjectors($xml, $file);
|
||||
|
||||
|
@ -49,9 +49,6 @@ class YamlFileLoader extends FileLoader
|
||||
// imports
|
||||
$this->parseImports($content, $file);
|
||||
|
||||
// extensions
|
||||
$this->loadFromExtensions($content);
|
||||
|
||||
// parameters
|
||||
if (isset($content['parameters'])) {
|
||||
foreach ($content['parameters'] as $key => $value) {
|
||||
@ -59,6 +56,9 @@ class YamlFileLoader extends FileLoader
|
||||
}
|
||||
}
|
||||
|
||||
// extensions
|
||||
$this->loadFromExtensions($content);
|
||||
|
||||
// interface injectors
|
||||
$this->parseInterfaceInjectors($content, $file);
|
||||
|
||||
|
@ -13,6 +13,7 @@
|
||||
|
||||
<project:bar babar="babar">
|
||||
<another />
|
||||
<another2>%project.parameter.foo%</another2>
|
||||
</project:bar>
|
||||
|
||||
</container>
|
||||
|
@ -5,4 +5,5 @@ services:
|
||||
project.service.foo:
|
||||
class: BAR
|
||||
|
||||
project.bar: ~
|
||||
project.bar:
|
||||
test: %project.parameter.foo%
|
||||
|
Reference in New Issue
Block a user