Explorar o código

fixed service first argument

jfsimon %!s(int64=14) %!d(string=hai) anos
pai
achega
9679029126
Modificáronse 1 ficheiros con 3 adicións e 1 borrados
  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;
     }
 }