فهرست منبع

Merge pull request #2757 from WouterJ/patch-3

Fixed service existence check
Thomas 10 سال پیش
والد
کامیت
b6c27090e4
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);
             $extensions = $this->getExtensionsForAdmin($id, $admin, $container, $extensionMap);
 
 
             foreach ($extensions as $extension) {
             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));
                     throw new \InvalidArgumentException(sprintf('Unable to find extension service for id %s', $extension));
                 }
                 }
                 $admin->addMethodCall('addExtension', array(new Reference($extension)));
                 $admin->addMethodCall('addExtension', array(new Reference($extension)));