Skip to content

Commit fbf12f1

Browse files
committed
[Cache] Remove support for Doctrine Cache
1 parent 2a86409 commit fbf12f1

File tree

6 files changed

+1
-76
lines changed

6 files changed

+1
-76
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ CHANGELOG
1919
* Remove all other values than "none", "php_array" and "file" for `framework.annotation.cache`
2020
* Register workflow services as private
2121
* Remove support for passing a `RouteCollectionBuilder` to `MicroKernelTrait::configureRoutes()`, type-hint `RoutingConfigurator` instead
22+
* Remove the `cache.adapter.doctrine` service
2223

2324
5.4
2425
---

Resources/config/cache.php

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
use Symfony\Component\Cache\Adapter\AdapterInterface;
1717
use Symfony\Component\Cache\Adapter\ApcuAdapter;
1818
use Symfony\Component\Cache\Adapter\ArrayAdapter;
19-
use Symfony\Component\Cache\Adapter\DoctrineAdapter;
2019
use Symfony\Component\Cache\Adapter\FilesystemAdapter;
2120
use Symfony\Component\Cache\Adapter\MemcachedAdapter;
2221
use Symfony\Component\Cache\Adapter\PdoAdapter;
@@ -93,28 +92,7 @@
9392
->call('setLogger', [service('logger')->ignoreOnInvalid()])
9493
->tag('cache.pool', ['clearer' => 'cache.default_clearer', 'reset' => 'reset'])
9594
->tag('monolog.logger', ['channel' => 'cache'])
96-
;
9795

98-
if (class_exists(DoctrineAdapter::class)) {
99-
$container->services()->set('cache.adapter.doctrine', DoctrineAdapter::class)
100-
->abstract()
101-
->args([
102-
abstract_arg('Doctrine provider service'),
103-
'', // namespace
104-
0, // default lifetime
105-
])
106-
->call('setLogger', [service('logger')->ignoreOnInvalid()])
107-
->tag('cache.pool', [
108-
'provider' => 'cache.default_doctrine_provider',
109-
'clearer' => 'cache.default_clearer',
110-
'reset' => 'reset',
111-
])
112-
->tag('monolog.logger', ['channel' => 'cache'])
113-
->deprecate('symfony/framework-bundle', '5.4', 'The abstract service "%service_id%" is deprecated.')
114-
;
115-
}
116-
117-
$container->services()
11896
->set('cache.adapter.filesystem', FilesystemAdapter::class)
11997
->abstract()
12098
->args([

Tests/DependencyInjection/Fixtures/php/doctrine_cache.php

Lines changed: 0 additions & 13 deletions
This file was deleted.

Tests/DependencyInjection/Fixtures/xml/doctrine_cache.xml

Lines changed: 0 additions & 13 deletions
This file was deleted.

Tests/DependencyInjection/Fixtures/yml/doctrine_cache.yml

Lines changed: 0 additions & 7 deletions
This file was deleted.

Tests/DependencyInjection/FrameworkExtensionTest.php

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
use Symfony\Component\Cache\Adapter\ApcuAdapter;
2525
use Symfony\Component\Cache\Adapter\ArrayAdapter;
2626
use Symfony\Component\Cache\Adapter\ChainAdapter;
27-
use Symfony\Component\Cache\Adapter\DoctrineAdapter;
2827
use Symfony\Component\Cache\Adapter\FilesystemAdapter;
2928
use Symfony\Component\Cache\Adapter\ProxyAdapter;
3029
use Symfony\Component\Cache\Adapter\RedisAdapter;
@@ -1522,23 +1521,6 @@ public function testCachePoolServices()
15221521
}
15231522
}
15241523

1525-
/**
1526-
* @group legacy
1527-
*/
1528-
public function testDoctrineCache()
1529-
{
1530-
if (!class_exists(DoctrineAdapter::class)) {
1531-
self::markTestSkipped('This test requires symfony/cache 5.4 or lower.');
1532-
}
1533-
1534-
$container = $this->createContainerFromFile('doctrine_cache', [], true, false);
1535-
$container->setParameter('cache.prefix.seed', 'test');
1536-
$container->addCompilerPass(new CachePoolPass());
1537-
$container->compile();
1538-
1539-
$this->assertCachePoolServiceDefinitionIsCreated($container, 'cache.bar', 'cache.adapter.doctrine', 5);
1540-
}
1541-
15421524
public function testRedisTagAwareAdapter()
15431525
{
15441526
$container = $this->createContainerFromFile('cache', [], true);
@@ -1973,9 +1955,6 @@ private function assertCachePoolServiceDefinitionIsCreated(ContainerBuilder $con
19731955
case 'cache.adapter.apcu':
19741956
$this->assertSame(ApcuAdapter::class, $parentDefinition->getClass());
19751957
break;
1976-
case 'cache.adapter.doctrine':
1977-
$this->assertSame(DoctrineAdapter::class, $parentDefinition->getClass());
1978-
break;
19791958
case 'cache.app':
19801959
case 'cache.adapter.filesystem':
19811960
$this->assertSame(FilesystemAdapter::class, $parentDefinition->getClass());

0 commit comments

Comments
 (0)