do not overwrite variable value
This commit is contained in:
parent
8855082ffd
commit
e379dbbf21
@ -54,7 +54,7 @@ class CachePoolPass implements CompilerPassInterface
|
|||||||
}
|
}
|
||||||
$seed .= '.'.$container->getParameter('kernel.container_class');
|
$seed .= '.'.$container->getParameter('kernel.container_class');
|
||||||
|
|
||||||
$pools = [];
|
$allPools = [];
|
||||||
$clearers = [];
|
$clearers = [];
|
||||||
$attributes = [
|
$attributes = [
|
||||||
'provider',
|
'provider',
|
||||||
@ -119,7 +119,7 @@ class CachePoolPass implements CompilerPassInterface
|
|||||||
$clearers[$clearer][$name] = new Reference($id, $container::IGNORE_ON_UNINITIALIZED_REFERENCE);
|
$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;
|
$notAliasedCacheClearerId = $this->cacheClearerId;
|
||||||
@ -127,7 +127,7 @@ class CachePoolPass implements CompilerPassInterface
|
|||||||
$this->cacheClearerId = (string) $container->getAlias($this->cacheClearerId);
|
$this->cacheClearerId = (string) $container->getAlias($this->cacheClearerId);
|
||||||
}
|
}
|
||||||
if ($container->hasDefinition($this->cacheClearerId)) {
|
if ($container->hasDefinition($this->cacheClearerId)) {
|
||||||
$clearers[$notAliasedCacheClearerId] = $pools;
|
$clearers[$notAliasedCacheClearerId] = $allPools;
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach ($clearers as $id => $pools) {
|
foreach ($clearers as $id => $pools) {
|
||||||
@ -145,7 +145,7 @@ class CachePoolPass implements CompilerPassInterface
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($container->hasDefinition('console.command.cache_pool_list')) {
|
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));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user