Pārlūkot izejas kodu

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

Lukas Kahwe Smith 14 gadi atpakaļ
vecāks
revīzija
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;