Closed
Description
Symfony version(s) affected: 4.3 and up (#31021)
Description
Caches are not all reported by cache:pool:list. Ensuring there is at least two caches in separate clearers will trigger the bug.
Origin
Code from: https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Cache/DependencyInjection/CachePoolPass.php
Out of context code has been removed to simplify my point.
$pools = [];
$clearers = [];
// Fill out $pools and $clearers;
foreach ($clearers as $id => $pools) {
// $pools will be leaked out of the scope;
// Hopefully unintended behavior;
}
if ($container->hasDefinition('console.command.cache_pool_list')) {
$container->getDefinition('console.command.cache_pool_list')->replaceArgument(0, array_keys($pools));
}