Skip to content

Commit 9b1edd2

Browse files
IndraGunawannicolas-grekas
authored andcommitted
[FrameworkBundle] set NamespacedPoolInterface alias to cache.app
1 parent 030646f commit 9b1edd2

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

DependencyInjection/FrameworkExtension.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -302,6 +302,10 @@ public function load(array $configs, ContainerBuilder $container): void
302302
// Load Cache configuration first as it is used by other components
303303
$loader->load('cache.php');
304304

305+
if (!interface_exists(NamespacedPoolInterface::class)) {
306+
$container->removeAlias(NamespacedPoolInterface::class);
307+
}
308+
305309
$configuration = $this->getConfiguration($configs, $container);
306310
$config = $this->processConfiguration($configuration, $configs);
307311

Resources/config/cache.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
use Symfony\Component\Cache\Messenger\EarlyExpirationHandler;
2929
use Symfony\Component\HttpKernel\CacheClearer\Psr6CacheClearer;
3030
use Symfony\Contracts\Cache\CacheInterface;
31+
use Symfony\Contracts\Cache\NamespacedPoolInterface;
3132
use Symfony\Contracts\Cache\TagAwareCacheInterface;
3233

3334
return static function (ContainerConfigurator $container) {
@@ -250,6 +251,8 @@
250251

251252
->alias(CacheInterface::class, 'cache.app')
252253

254+
->alias(NamespacedPoolInterface::class, 'cache.app')
255+
253256
->alias(TagAwareCacheInterface::class, 'cache.app.taggable')
254257
;
255258
};

0 commit comments

Comments
 (0)