Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 135c6f7

Browse files
bug #35039 [DI] skip looking for config class when the extension class is anonymous (nicolas-grekas)
This PR was merged into the 3.4 branch. Discussion ---------- [DI] skip looking for config class when the extension class is anonymous | Q | A | ------------- | --- | Branch? | 3.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | Fix #34613 | License | MIT | Doc PR | - Commits ------- 1c7eda4 [DI] skip looking for config class when the extension class is anonymous
2 parents 939d3bf + 1c7eda4 commit 135c6f7

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/Symfony/Component/DependencyInjection/Extension/Extension.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,11 @@ public function getAlias()
8080
public function getConfiguration(array $config, ContainerBuilder $container)
8181
{
8282
$class = \get_class($this);
83+
84+
if (false !== strpos($class, "\0")) {
85+
return null; // ignore anonymous classes
86+
}
87+
8388
$class = substr_replace($class, '\Configuration', strrpos($class, '\\'));
8489
$class = $container->getReflectionClass($class);
8590
$constructor = $class ? $class->getConstructor() : null;

0 commit comments

Comments
 (0)