Преглед на файлове

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