Skip to content

Commit a8d0da4

Browse files
bug #58950 [FrameworkBundle] Revert " Deprecate making cache.app adapter taggable" (keulinho)
This PR was merged into the 7.2 branch. Discussion ---------- [FrameworkBundle] Revert " Deprecate making `cache.app` adapter taggable" This reverts commit eed5b284618ec95eedbc376fb140b8fc24619372. | Q | A | ------------- | --- | Branch? | 7.2 | Bug fix? | yes | New feature? | no | Deprecations? | no | Issues | Fix symfony/symfony#58790 | License | MIT As discussed in former PR the deprecation was wrong, and trying to solve the deprecation will lead in errors. Refer to symfony/symfony#58830 for detailed analysis. [according to the creator](symfony/symfony#58830 (comment)) of the original issue the behaviour that is making problems is actually covered by tests, so I'm not sure how to proceed, but the deprecation is clearly wrong and should not make it to 7.2! Commits ------- 25f0925d9d2 Revert "[FrameworkBundle] Deprecate making `cache.app` adapter taggable"
2 parents eca6e49 + 98aa662 commit a8d0da4

File tree

5 files changed

+0
-60
lines changed

5 files changed

+0
-60
lines changed

DependencyInjection/FrameworkExtension.php

-5
Original file line numberDiff line numberDiff line change
@@ -2398,11 +2398,6 @@ private function registerCacheConfiguration(array $config, ContainerBuilder $con
23982398
];
23992399
}
24002400
foreach ($config['pools'] as $name => $pool) {
2401-
if (\in_array('cache.app', $pool['adapters'] ?? [], true) && $pool['tags']) {
2402-
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).');
2403-
// 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).');
2404-
}
2405-
24062401
$pool['adapters'] = $pool['adapters'] ?: ['cache.app'];
24072402

24082403
$isRedisTagAware = ['cache.adapter.redis_tag_aware'] === $pool['adapters'];

Tests/DependencyInjection/Fixtures/php/cache_cacheapp_tagaware.php

-16
This file was deleted.

Tests/DependencyInjection/Fixtures/xml/cache_cacheapp_tagaware.xml

-15
This file was deleted.

Tests/DependencyInjection/Fixtures/yml/cache_cacheapp_tagaware.yml

-11
This file was deleted.

Tests/DependencyInjection/FrameworkExtensionTestCase.php

-13
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313

1414
use Psr\Cache\CacheItemPoolInterface;
1515
use Psr\Log\LoggerAwareInterface;
16-
use Symfony\Bridge\PhpUnit\ExpectUserDeprecationMessageTrait;
1716
use Symfony\Bundle\FrameworkBundle\DependencyInjection\FrameworkExtension;
1817
use Symfony\Bundle\FrameworkBundle\FrameworkBundle;
1918
use Symfony\Bundle\FrameworkBundle\Tests\Fixtures\Messenger\DummyMessage;
@@ -96,8 +95,6 @@
9695

9796
abstract class FrameworkExtensionTestCase extends TestCase
9897
{
99-
use ExpectUserDeprecationMessageTrait;
100-
10198
private static array $containerCache = [];
10299

103100
abstract protected function loadFromFile(ContainerBuilder $container, $file);
@@ -1856,16 +1853,6 @@ public function testCacheTaggableTagAppliedToPools()
18561853
}
18571854
}
18581855

1859-
/**
1860-
* @group legacy
1861-
*/
1862-
public function testTaggableCacheAppIsDeprecated()
1863-
{
1864-
$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).');
1865-
1866-
$this->createContainerFromFile('cache_cacheapp_tagaware');
1867-
}
1868-
18691856
/**
18701857
* @dataProvider appRedisTagAwareConfigProvider
18711858
*/

0 commit comments

Comments
 (0)