From e379dbbf219b52779b34acb40a00afc94f758541 Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Fri, 27 Dec 2019 10:02:48 +0100 Subject: [PATCH] do not overwrite variable value --- .../Component/Cache/DependencyInjection/CachePoolPass.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Symfony/Component/Cache/DependencyInjection/CachePoolPass.php b/src/Symfony/Component/Cache/DependencyInjection/CachePoolPass.php index eef9e75b0633..00784b64f5f9 100644 --- a/src/Symfony/Component/Cache/DependencyInjection/CachePoolPass.php +++ b/src/Symfony/Component/Cache/DependencyInjection/CachePoolPass.php @@ -54,7 +54,7 @@ public function process(ContainerBuilder $container) } $seed .= '.'.$container->getParameter('kernel.container_class'); - $pools = []; + $allPools = []; $clearers = []; $attributes = [ 'provider', @@ -119,7 +119,7 @@ public function process(ContainerBuilder $container) $clearers[$clearer][$name] = new Reference($id, $container::IGNORE_ON_UNINITIALIZED_REFERENCE); } - $pools[$name] = new Reference($id, $container::IGNORE_ON_UNINITIALIZED_REFERENCE); + $allPools[$name] = new Reference($id, $container::IGNORE_ON_UNINITIALIZED_REFERENCE); } $notAliasedCacheClearerId = $this->cacheClearerId; @@ -127,7 +127,7 @@ public function process(ContainerBuilder $container) $this->cacheClearerId = (string) $container->getAlias($this->cacheClearerId); } if ($container->hasDefinition($this->cacheClearerId)) { - $clearers[$notAliasedCacheClearerId] = $pools; + $clearers[$notAliasedCacheClearerId] = $allPools; } foreach ($clearers as $id => $pools) { @@ -145,7 +145,7 @@ public function process(ContainerBuilder $container) } if ($container->hasDefinition('console.command.cache_pool_list')) { - $container->getDefinition('console.command.cache_pool_list')->replaceArgument(0, array_keys($pools)); + $container->getDefinition('console.command.cache_pool_list')->replaceArgument(0, array_keys($allPools)); } }