ソースを参照

Use findDefinition to also support alias services

Wouter J 10 年 前
コミット
23e3fbad59
1 ファイル変更1 行追加1 行削除
  1. 1 1
      DependencyInjection/Compiler/ExtensionCompilerPass.php

+ 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)));