Sfoglia il codice sorgente

fixed service first argument

jfsimon 14 anni fa
parent
commit
9679029126
1 ha cambiato i file con 3 aggiunte e 1 eliminazioni
  1. 3 1
      DependencyInjection/AddDependencyCallsPass.php

+ 3 - 1
DependencyInjection/AddDependencyCallsPass.php

@@ -46,6 +46,8 @@ class AddDependencyCallsPass implements CompilerPassInterface
             $arguments = $definition->getArguments();
             if (preg_match('/%(.*)%/', $arguments[0], $matches)) {
                 $class = $container->getParameter($matches[1]);
+            } else {
+                $class = $arguments[0];
             }
 
             $admins[] = $id;
@@ -123,7 +125,7 @@ class AddDependencyCallsPass implements CompilerPassInterface
         }
 
         $definition->addMethodCall('configure');
-        
+
         return $definition;
     }
 }