Skip to content

Commit fbf02f4

Browse files
committed
Remove remaining support for Doctrine Cache
Signed-off-by: Alexander M. Turek <[email protected]>
1 parent 495dab2 commit fbf02f4

File tree

3 files changed

+1
-23
lines changed

3 files changed

+1
-23
lines changed

DependencyInjection/Configuration.php

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@
1212
namespace Symfony\Bundle\FrameworkBundle\DependencyInjection;
1313

1414
use Doctrine\Common\Annotations\Annotation;
15-
use Doctrine\Common\Annotations\PsrCachedReader;
16-
use Doctrine\Common\Cache\Cache;
1715
use Doctrine\DBAL\Connection;
1816
use Symfony\Bundle\FullStack;
1917
use Symfony\Component\Asset\Package;
@@ -930,9 +928,6 @@ private function addValidationSection(ArrayNodeDefinition $rootNode, callable $e
930928

931929
private function addAnnotationsSection(ArrayNodeDefinition $rootNode, callable $willBeAvailable)
932930
{
933-
$doctrineCache = $willBeAvailable('doctrine/cache', Cache::class, 'doctrine/annotation');
934-
$psr6Cache = $willBeAvailable('symfony/cache', PsrCachedReader::class, 'doctrine/annotation');
935-
936931
$rootNode
937932
->children()
938933
->arrayNode('annotations')
@@ -941,7 +936,7 @@ private function addAnnotationsSection(ArrayNodeDefinition $rootNode, callable $
941936
->children()
942937
->enumNode('cache')
943938
->values(['none', 'php_array', 'file'])
944-
->defaultValue(($doctrineCache || $psr6Cache) ? 'php_array' : 'none')
939+
->defaultValue('php_array')
945940
->end()
946941
->scalarNode('file_cache_dir')->defaultValue('%kernel.cache_dir%/annotations')->end()
947942
->booleanNode('debug')->defaultValue($this->debug)->end()

Resources/config/annotations.php

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
use Doctrine\Common\Annotations\AnnotationRegistry;
1616
use Doctrine\Common\Annotations\PsrCachedReader;
1717
use Doctrine\Common\Annotations\Reader;
18-
use Doctrine\Common\Cache\Psr6\DoctrineProvider;
1918
use Symfony\Bundle\FrameworkBundle\CacheWarmer\AnnotationsCacheWarmer;
2019
use Symfony\Component\Cache\Adapter\ArrayAdapter;
2120
use Symfony\Component\Cache\Adapter\FilesystemAdapter;
@@ -46,13 +45,6 @@
4645
abstract_arg('Cache-Directory'),
4746
])
4847

49-
->set('annotations.filesystem_cache', DoctrineProvider::class)
50-
->factory([DoctrineProvider::class, 'wrap'])
51-
->args([
52-
service('annotations.filesystem_cache_adapter'),
53-
])
54-
->deprecate('symfony/framework-bundle', '5.4', '"%service_id% is deprecated"')
55-
5648
->set('annotations.cache_warmer', AnnotationsCacheWarmer::class)
5749
->args([
5850
service('annotations.reader'),
@@ -69,13 +61,6 @@
6961
])
7062
->tag('container.hot_path')
7163

72-
->set('annotations.cache', DoctrineProvider::class)
73-
->factory([DoctrineProvider::class, 'wrap'])
74-
->args([
75-
service('annotations.cache_adapter'),
76-
])
77-
->deprecate('symfony/framework-bundle', '5.4', '"%service_id% is deprecated"')
78-
7964
->alias('annotation_reader', 'annotations.reader')
8065
->alias(Reader::class, 'annotation_reader');
8166
};

composer.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232
},
3333
"require-dev": {
3434
"doctrine/annotations": "^1.13.1",
35-
"doctrine/cache": "^1.11|^2.0",
3635
"doctrine/persistence": "^1.3|^2.0",
3736
"symfony/asset": "^5.4|^6.0",
3837
"symfony/browser-kit": "^5.4|^6.0",
@@ -69,7 +68,6 @@
6968
},
7069
"conflict": {
7170
"doctrine/annotations": "<1.13.1",
72-
"doctrine/cache": "<1.11",
7371
"doctrine/persistence": "<1.3",
7472
"phpdocumentor/reflection-docblock": "<3.2.2",
7573
"phpdocumentor/type-resolver": "<1.4.0",

0 commit comments

Comments
 (0)