Explorar o código

do not add method calls from interface injection if a method call has already been set manually

Lukas Kahwe Smith %!s(int64=14) %!d(string=hai) anos
pai
achega
c9be18a79f

+ 3 - 1
src/Symfony/Component/DependencyInjection/InterfaceInjector.php

@@ -76,7 +76,9 @@ class InterfaceInjector
 
         foreach ($this->calls as $callback) {
             list($method, $arguments) = $callback;
-            $definition->addMethodCall($method, $arguments);
+            if (!$definition->hasMethodCall($method)) {
+                $definition->addMethodCall($method, $arguments);
+            }
         }
 
         $this->processedDefinitions[] = $definition;