X-Git-Url: https://yaffs.net/gitweb/?a=blobdiff_plain;f=vendor%2Fsymfony%2Fdependency-injection%2FCompiler%2FCheckCircularReferencesPass.php;h=6191893e035606201982e3e2438f5b169f38591c;hb=af6d1fb995500ae68849458ee10d66abbdcfb252;hp=f39a89af2be710018cf6d31c5633424934fd6fca;hpb=a2bd1bf0c2c1f1a17d188f4dc0726a45494cefae;p=yaffs-website diff --git a/vendor/symfony/dependency-injection/Compiler/CheckCircularReferencesPass.php b/vendor/symfony/dependency-injection/Compiler/CheckCircularReferencesPass.php index f39a89af2..6191893e0 100644 --- a/vendor/symfony/dependency-injection/Compiler/CheckCircularReferencesPass.php +++ b/vendor/symfony/dependency-injection/Compiler/CheckCircularReferencesPass.php @@ -31,8 +31,6 @@ class CheckCircularReferencesPass implements CompilerPassInterface /** * Checks the ContainerBuilder object for circular references. - * - * @param ContainerBuilder $container The ContainerBuilder instances */ public function process(ContainerBuilder $container) { @@ -51,7 +49,7 @@ class CheckCircularReferencesPass implements CompilerPassInterface * * @param ServiceReferenceGraphEdge[] $edges An array of Edges * - * @throws ServiceCircularReferenceException When a circular reference is found. + * @throws ServiceCircularReferenceException when a circular reference is found */ private function checkOutEdges(array $edges) { @@ -60,8 +58,8 @@ class CheckCircularReferencesPass implements CompilerPassInterface $id = $node->getId(); if (empty($this->checkedNodes[$id])) { - // don't check circular dependencies for lazy services - if (!$node->getValue() || !$node->getValue()->isLazy()) { + // Don't check circular references for lazy edges + if (!$node->getValue() || (!$edge->isLazy() && !$edge->isWeak())) { $searchKey = array_search($id, $this->currentPath); $this->currentPath[] = $id;