do not overwrite variable value

This commit is contained in:
Christian Flothmann 2019-12-27 10:02:48 +01:00
parent 8855082ffd
commit e379dbbf21

View File

@ -54,7 +54,7 @@ class CachePoolPass implements CompilerPassInterface
}
$seed .= '.'.$container->getParameter('kernel.container_class');
$pools = [];
$allPools = [];
$clearers = [];
$attributes = [
'provider',
@ -119,7 +119,7 @@ class CachePoolPass implements CompilerPassInterface
$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 @@ class CachePoolPass implements CompilerPassInterface
$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 @@ class CachePoolPass implements CompilerPassInterface
}
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));
}
}