diff --git a/UPGRADE-7.2.md b/UPGRADE-7.2.md
index 4ef726b8d833..eef20ebcc5b9 100644
--- a/UPGRADE-7.2.md
+++ b/UPGRADE-7.2.md
@@ -12,6 +12,7 @@ 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
Form
----
diff --git a/src/Symfony/Bundle/FrameworkBundle/CHANGELOG.md b/src/Symfony/Bundle/FrameworkBundle/CHANGELOG.md
index 7058a3fb2573..62eab04571df 100644
--- a/src/Symfony/Bundle/FrameworkBundle/CHANGELOG.md
+++ b/src/Symfony/Bundle/FrameworkBundle/CHANGELOG.md
@@ -9,6 +9,7 @@ CHANGELOG
* Make the `config/` directory optional in `MicroKernelTrait`, add support for service arguments in the
invokable Kernel class, and register `FrameworkBundle` by default when the `bundles.php` file is missing
* [BC BREAK] The `secrets:decrypt-to-local` command terminates with a non-zero exit code when a secret could not be read
+ * Deprecate making `cache.app` adapter taggable, use the `cache.app.taggable` adapter instead
7.1
---
diff --git a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php
index 067e631c7226..e79dba300a94 100644
--- a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php
+++ b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php
@@ -2363,6 +2363,11 @@ 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
new file mode 100644
index 000000000000..77606f5b144b
--- /dev/null
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/cache_cacheapp_tagaware.php
@@ -0,0 +1,16 @@
+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
new file mode 100644
index 000000000000..7d59e19d514b
--- /dev/null
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/cache_cacheapp_tagaware.xml
@@ -0,0 +1,15 @@
+
+
Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.
Alternative Proxies: