From 25f0925d9d2c6eba19a88bcee2b335cf728b44c2 Mon Sep 17 00:00:00 2001 From: Jonas Elfering Date: Wed, 20 Nov 2024 16:19:47 +0100 Subject: [PATCH] Revert "[FrameworkBundle] Deprecate making `cache.app` adapter taggable" This reverts commit eed5b284618ec95eedbc376fb140b8fc24619372. --- UPGRADE-7.2.md | 1 - .../DependencyInjection/FrameworkExtension.php | 5 ----- .../Fixtures/php/cache_cacheapp_tagaware.php | 16 ---------------- .../Fixtures/xml/cache_cacheapp_tagaware.xml | 15 --------------- .../Fixtures/yml/cache_cacheapp_tagaware.yml | 11 ----------- .../FrameworkExtensionTestCase.php | 13 ------------- 6 files changed, 61 deletions(-) delete mode 100644 src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/cache_cacheapp_tagaware.php delete mode 100644 src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/cache_cacheapp_tagaware.xml delete mode 100644 src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/cache_cacheapp_tagaware.yml diff --git a/UPGRADE-7.2.md b/UPGRADE-7.2.md index 1f77b3e2964df..8e2091862d0e9 100644 --- a/UPGRADE-7.2.md +++ b/UPGRADE-7.2.md @@ -12,7 +12,6 @@ Cache ----- * `igbinary_serialize()` is not used by default when the igbinary extension is installed - * Deprecate making `cache.app` adapter taggable, use the `cache.app.taggable` adapter instead Console ------- diff --git a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php index a7749cd30faad..62515856164f5 100644 --- a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php +++ b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php @@ -2396,11 +2396,6 @@ private function registerCacheConfiguration(array $config, ContainerBuilder $con ]; } foreach ($config['pools'] as $name => $pool) { - if (\in_array('cache.app', $pool['adapters'] ?? [], true) && $pool['tags']) { - trigger_deprecation('symfony/framework-bundle', '7.2', 'Using the "tags" option with the "cache.app" adapter is deprecated. You can use the "cache.app.taggable" adapter instead (aliased to the TagAwareCacheInterface for autowiring).'); - // throw new LogicException('The "tags" option cannot be used with the "cache.app" adapter. You can use the "cache.app.taggable" adapter instead (aliased to the TagAwareCacheInterface for autowiring).'); - } - $pool['adapters'] = $pool['adapters'] ?: ['cache.app']; $isRedisTagAware = ['cache.adapter.redis_tag_aware'] === $pool['adapters']; diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/cache_cacheapp_tagaware.php b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/cache_cacheapp_tagaware.php deleted file mode 100644 index 77606f5b144bd..0000000000000 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/cache_cacheapp_tagaware.php +++ /dev/null @@ -1,16 +0,0 @@ -loadFromExtension('framework', [ - 'annotations' => false, - 'http_method_override' => false, - 'handle_all_throwables' => true, - 'php_errors' => ['log' => true], - 'cache' => [ - 'pools' => [ - 'app.tagaware' => [ - 'adapter' => 'cache.app', - 'tags' => true, - ], - ], - ], -]); diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/cache_cacheapp_tagaware.xml b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/cache_cacheapp_tagaware.xml deleted file mode 100644 index 7d59e19d514b8..0000000000000 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/cache_cacheapp_tagaware.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - - diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/cache_cacheapp_tagaware.yml b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/cache_cacheapp_tagaware.yml deleted file mode 100644 index 32ef3d49cdfc9..0000000000000 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/cache_cacheapp_tagaware.yml +++ /dev/null @@ -1,11 +0,0 @@ -framework: - annotations: false - http_method_override: false - handle_all_throwables: true - php_errors: - log: true - cache: - pools: - app.tagaware: - adapter: cache.app - tags: true diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTestCase.php b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTestCase.php index 016ae507badc8..798217191e7c0 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTestCase.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTestCase.php @@ -13,7 +13,6 @@ use Psr\Cache\CacheItemPoolInterface; use Psr\Log\LoggerAwareInterface; -use Symfony\Bridge\PhpUnit\ExpectUserDeprecationMessageTrait; use Symfony\Bundle\FrameworkBundle\DependencyInjection\FrameworkExtension; use Symfony\Bundle\FrameworkBundle\FrameworkBundle; use Symfony\Bundle\FrameworkBundle\Tests\Fixtures\Messenger\DummyMessage; @@ -96,8 +95,6 @@ abstract class FrameworkExtensionTestCase extends TestCase { - use ExpectUserDeprecationMessageTrait; - private static array $containerCache = []; abstract protected function loadFromFile(ContainerBuilder $container, $file); @@ -1856,16 +1853,6 @@ public function testCacheTaggableTagAppliedToPools() } } - /** - * @group legacy - */ - public function testTaggableCacheAppIsDeprecated() - { - $this->expectUserDeprecationMessage('Since symfony/framework-bundle 7.2: Using the "tags" option with the "cache.app" adapter is deprecated. You can use the "cache.app.taggable" adapter instead (aliased to the TagAwareCacheInterface for autowiring).'); - - $this->createContainerFromFile('cache_cacheapp_tagaware'); - } - /** * @dataProvider appRedisTagAwareConfigProvider */