Skip to content

Commit

Permalink
Revert "[FrameworkBundle] Deprecate making cache.app adapter taggable"
Browse files Browse the repository at this point in the history
This reverts commit eed5b28.
  • Loading branch information
keulinho committed Nov 20, 2024
1 parent 9f81d93 commit 25f0925
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 61 deletions.
1 change: 0 additions & 1 deletion UPGRADE-7.2.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
-------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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'];
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -96,8 +95,6 @@

abstract class FrameworkExtensionTestCase extends TestCase
{
use ExpectUserDeprecationMessageTrait;

private static array $containerCache = [];

abstract protected function loadFromFile(ContainerBuilder $container, $file);
Expand Down Expand Up @@ -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
*/
Expand Down

0 comments on commit 25f0925

Please sign in to comment.