diff vendor/symfony/dependency-injection/Compiler/ServiceReferenceGraph.php @ 17:129ea1e6d783

Update, including to Drupal core 8.6.10
author Chris Cannam
date Thu, 28 Feb 2019 13:21:36 +0000
parents 1fec387a4317
children
line wrap: on
line diff
--- a/vendor/symfony/dependency-injection/Compiler/ServiceReferenceGraph.php	Tue Jul 10 15:07:59 2018 +0100
+++ b/vendor/symfony/dependency-injection/Compiler/ServiceReferenceGraph.php	Thu Feb 28 13:21:36 2019 +0000
@@ -28,7 +28,7 @@
     /**
      * @var ServiceReferenceGraphNode[]
      */
-    private $nodes = array();
+    private $nodes = [];
 
     /**
      * Checks if the graph has a specific node.
@@ -78,7 +78,7 @@
         foreach ($this->nodes as $node) {
             $node->clear();
         }
-        $this->nodes = array();
+        $this->nodes = [];
     }
 
     /**
@@ -91,11 +91,13 @@
      * @param string $reference
      * @param bool   $lazy
      * @param bool   $weak
+     * @param bool   $byConstructor
      */
-    public function connect($sourceId, $sourceValue, $destId, $destValue = null, $reference = null/*, bool $lazy = false, bool $weak = false*/)
+    public function connect($sourceId, $sourceValue, $destId, $destValue = null, $reference = null/*, bool $lazy = false, bool $weak = false, bool $byConstructor = false*/)
     {
-        $lazy = func_num_args() >= 6 ? func_get_arg(5) : false;
-        $weak = func_num_args() >= 7 ? func_get_arg(6) : false;
+        $lazy = \func_num_args() >= 6 ? func_get_arg(5) : false;
+        $weak = \func_num_args() >= 7 ? func_get_arg(6) : false;
+        $byConstructor = \func_num_args() >= 8 ? func_get_arg(7) : false;
 
         if (null === $sourceId || null === $destId) {
             return;
@@ -103,7 +105,7 @@
 
         $sourceNode = $this->createNode($sourceId, $sourceValue);
         $destNode = $this->createNode($destId, $destValue);
-        $edge = new ServiceReferenceGraphEdge($sourceNode, $destNode, $reference, $lazy, $weak);
+        $edge = new ServiceReferenceGraphEdge($sourceNode, $destNode, $reference, $lazy, $weak, $byConstructor);
 
         $sourceNode->addOutEdge($edge);
         $destNode->addInEdge($edge);