[DependencyInjection] added the extension files in the list of loaded resources
This commit is contained in:
parent
8e81bbbb4e
commit
5d8529740a
@ -343,6 +343,9 @@ EOF
|
||||
$values = static::convertDomElementToArray($node);
|
||||
$config = $this->getExtension($node->namespaceURI)->load($node->localName, is_array($values) ? $values : array($values));
|
||||
|
||||
$r = new \ReflectionObject($this->getExtension($node->namespaceURI));
|
||||
$config->addResource(new FileResource($r->getFileName()));
|
||||
|
||||
$configuration->merge($config);
|
||||
}
|
||||
}
|
||||
|
@ -253,7 +253,7 @@ class YamlFileLoader extends FileLoader
|
||||
|
||||
protected function loadFromExtensions(BuilderConfiguration $configuration, $content)
|
||||
{
|
||||
foreach ($content as $key => $config)
|
||||
foreach ($content as $key => $values)
|
||||
{
|
||||
if (in_array($key, array('imports', 'parameters', 'services')))
|
||||
{
|
||||
@ -262,12 +262,17 @@ class YamlFileLoader extends FileLoader
|
||||
|
||||
list($namespace, $tag) = explode('.', $key);
|
||||
|
||||
if (!is_array($config))
|
||||
if (!is_array($values))
|
||||
{
|
||||
$config = array();
|
||||
$values = array();
|
||||
}
|
||||
|
||||
$configuration->merge(static::getExtension($namespace)->load($tag, $config));
|
||||
$config = static::getExtension($namespace)->load($tag, $values);
|
||||
|
||||
$r = new \ReflectionObject($this->getExtension($namespace));
|
||||
$config->addResource(new FileResource($r->getFileName()));
|
||||
|
||||
$configuration->merge($config);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user