summaryrefslogtreecommitdiff
path: root/vendor/symfony/cache/DependencyInjection
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/symfony/cache/DependencyInjection')
-rw-r--r--vendor/symfony/cache/DependencyInjection/CachePoolPass.php10
1 files changed, 10 insertions, 0 deletions
diff --git a/vendor/symfony/cache/DependencyInjection/CachePoolPass.php b/vendor/symfony/cache/DependencyInjection/CachePoolPass.php
index b1af39755e..5d7a2369c2 100644
--- a/vendor/symfony/cache/DependencyInjection/CachePoolPass.php
+++ b/vendor/symfony/cache/DependencyInjection/CachePoolPass.php
@@ -68,14 +68,20 @@ class CachePoolPass implements CompilerPassInterface
if ($pool->isAbstract()) {
continue;
}
+ $class = $adapter->getClass();
while ($adapter instanceof ChildDefinition) {
$adapter = $container->findDefinition($adapter->getParent());
+ $class = $class ?: $adapter->getClass();
if ($t = $adapter->getTag($this->cachePoolTag)) {
$tags[0] += $t[0];
}
}
$name = $tags[0]['name'] ?? $id;
if (!isset($tags[0]['namespace'])) {
+ if (null !== $class) {
+ $seed .= '.'.$class;
+ }
+
$tags[0]['namespace'] = $this->getNamespace($seed, $name);
}
if (isset($tags[0]['clearer'])) {
@@ -136,6 +142,10 @@ class CachePoolPass implements CompilerPassInterface
$clearer->addTag($this->cacheSystemClearerTag);
}
}
+
+ if ($container->hasDefinition('console.command.cache_pool_list')) {
+ $container->getDefinition('console.command.cache_pool_list')->replaceArgument(0, array_keys($pools));
+ }
}
private function getNamespace($seed, $id)