Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / vendor / symfony / dependency-injection / Compiler / ResolveReferencesToAliasesPass.php
index 831d9945369180b4dc058820a38e64a80f6cf0e9..839af1ae232d36160d8df29d7cdda8a8b2153650 100644 (file)
@@ -11,9 +11,9 @@
 
 namespace Symfony\Component\DependencyInjection\Compiler;
 
+use Symfony\Component\DependencyInjection\ContainerBuilder;
 use Symfony\Component\DependencyInjection\Exception\ServiceCircularReferenceException;
 use Symfony\Component\DependencyInjection\Reference;
-use Symfony\Component\DependencyInjection\ContainerBuilder;
 
 /**
  * Replaces all references to aliases with references to the actual service.
@@ -66,7 +66,7 @@ class ResolveReferencesToAliasesPass extends AbstractRecursivePass
         $seen = array();
         while ($container->hasAlias($id)) {
             if (isset($seen[$id])) {
-                throw new ServiceCircularReferenceException($id, array_keys($seen));
+                throw new ServiceCircularReferenceException($id, array_merge(array_keys($seen), array($id)));
             }
             $seen[$id] = true;
             $id = $container->normalizeId($container->getAlias($id));