Explorar el Código

Merge pull request #2757 from WouterJ/patch-3

Fixed service existence check
Thomas hace 10 años
padre
commit
b6c27090e4
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  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->findDefinition($extension)) {
+                if (!$container->has($extension)) {
                     throw new \InvalidArgumentException(sprintf('Unable to find extension service for id %s', $extension));
                 }
                 $admin->addMethodCall('addExtension', array(new Reference($extension)));