[DI] skip looking for config class when the extension class is anonymous
This commit is contained in:
parent
e85acddc9a
commit
1c7eda4649
@ -80,6 +80,11 @@ abstract class Extension implements ExtensionInterface, ConfigurationExtensionIn
|
||||
public function getConfiguration(array $config, ContainerBuilder $container)
|
||||
{
|
||||
$class = \get_class($this);
|
||||
|
||||
if (false !== strpos($class, "\0")) {
|
||||
return null; // ignore anonymous classes
|
||||
}
|
||||
|
||||
$class = substr_replace($class, '\Configuration', strrpos($class, '\\'));
|
||||
$class = $container->getReflectionClass($class);
|
||||
$constructor = $class ? $class->getConstructor() : null;
|
||||
|
Reference in New Issue
Block a user