diff vendor/symfony/dependency-injection/Compiler/ResolveBindingsPass.php @ 5:12f9dff5fda9 tip

Update to Drupal core 8.7.1
author Chris Cannam
date Thu, 09 May 2019 15:34:47 +0100
parents a9cd425dd02b
children
line wrap: on
line diff
--- a/vendor/symfony/dependency-injection/Compiler/ResolveBindingsPass.php	Thu Feb 28 13:11:55 2019 +0000
+++ b/vendor/symfony/dependency-injection/Compiler/ResolveBindingsPass.php	Thu May 09 15:34:47 2019 +0100
@@ -34,6 +34,8 @@
      */
     public function process(ContainerBuilder $container)
     {
+        $this->usedBindings = $container->getRemovedBindingIds();
+
         try {
             parent::process($container);
 
@@ -115,15 +117,22 @@
             if ($method instanceof \ReflectionFunctionAbstract) {
                 $reflectionMethod = $method;
             } else {
-                $reflectionMethod = $this->getReflectionMethod($value, $method);
+                try {
+                    $reflectionMethod = $this->getReflectionMethod($value, $method);
+                } catch (RuntimeException $e) {
+                    if ($value->getFactory()) {
+                        continue;
+                    }
+                    throw $e;
+                }
             }
 
             foreach ($reflectionMethod->getParameters() as $key => $parameter) {
-                if (array_key_exists($key, $arguments) && '' !== $arguments[$key]) {
+                if (\array_key_exists($key, $arguments) && '' !== $arguments[$key]) {
                     continue;
                 }
 
-                if (array_key_exists('$'.$parameter->name, $bindings)) {
+                if (\array_key_exists('$'.$parameter->name, $bindings)) {
                     $arguments[$key] = $this->getBindingValue($bindings['$'.$parameter->name]);
 
                     continue;