Pārlūkot izejas kodu

Use findDefinition to also support alias services

Wouter J 10 gadi atpakaļ
vecāks
revīzija
23e3fbad59

+ 1 - 1
DependencyInjection/Compiler/ExtensionCompilerPass.php

@@ -64,7 +64,7 @@ class ExtensionCompilerPass implements CompilerPassInterface
             $extensions = $this->getExtensionsForAdmin($id, $admin, $container, $extensionMap);
 
             foreach ($extensions as $extension) {
-                if (!$container->hasDefinition($extension)) {
+                if (!$container->findDefinition($extension)) {
                     throw new \InvalidArgumentException(sprintf('Unable to find extension service for id %s', $extension));
                 }
                 $admin->addMethodCall('addExtension', array(new Reference($extension)));