[DependencyInjection] enhanced error message
This commit is contained in:
parent
bb3f5c5575
commit
001af2ae4a
@ -256,6 +256,15 @@ class YamlFileLoader extends FileLoader
|
||||
}
|
||||
|
||||
if (!$this->container->hasExtension($namespace)) {
|
||||
$extensionNamespaces = array_filter(array_map(function ($ext) { return $ext->getAlias(); }, $this->container->getExtensions()));
|
||||
throw new \InvalidArgumentException(sprintf(
|
||||
'There is no extension able to load the configuration for "%s" (in %s). Looked for namespace "%s", found %s',
|
||||
$namespace,
|
||||
$file,
|
||||
$namespace,
|
||||
$extensionNamespaces ? sprintf('"%s"', implode('", "', $extensionNamespaces)) : 'none'
|
||||
));
|
||||
|
||||
throw new \InvalidArgumentException(sprintf('There is no extension able to load the configuration for "%s" (in %s).', $namespace, $file));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user