Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 852cc29

Browse files
committed
bug #41452 [FrameworkBundle] Remove redundant cache service (derrabus)
This PR was merged into the 5.3 branch. Discussion ---------- [FrameworkBundle] Remove redundant cache service | Q | A | ------------- | --- | Branch? | 5.3 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | N/A | License | MIT | Doc PR | N/A Follows #40444 and #41230. `@Nyholm` and I have fixed the same problem on different branches. Merging both efforts, we've created two cache services that are supposed to serve the same purpose. This PR suggests to remove one of them. Commits ------- 3b197fe [Framework] Remove redundant cache service
2 parents a7049f7 + 3b197fe commit 852cc29

File tree

2 files changed

+3
-9
lines changed

2 files changed

+3
-9
lines changed

src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1551,7 +1551,7 @@ private function registerAnnotationsConfiguration(array $config, ContainerBuilde
15511551
$container->setDefinition('annotations.cached_reader', $container->getDefinition('annotations.psr_cached_reader'));
15521552

15531553
if ('php_array' === $config['cache']) {
1554-
$cacheService = 'annotations.psr_cache';
1554+
$cacheService = 'annotations.cache_adapter';
15551555

15561556
// Enable warmer only if PHP array is used for cache
15571557
$definition = $container->findDefinition('annotations.cache_warmer');

src/Symfony/Bundle/FrameworkBundle/Resources/config/annotations.php

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,11 @@
6868
param('kernel.cache_dir').'/annotations.php',
6969
service('cache.annotations'),
7070
])
71+
->tag('container.hot_path')
7172

7273
->set('annotations.cache', DoctrineProvider::class)
7374
->args([
74-
service('annotations.cache_adapter')
75+
service('annotations.cache_adapter'),
7576
])
7677
->tag('container.hot_path')
7778

@@ -86,13 +87,6 @@
8687
inline_service(ArrayAdapter::class),
8788
abstract_arg('Debug-Flag'),
8889
])
89-
->set('annotations.psr_cache', PhpArrayAdapter::class)
90-
->factory([PhpArrayAdapter::class, 'create'])
91-
->args([
92-
param('kernel.cache_dir').'/annotations.php',
93-
service('cache.annotations'),
94-
])
95-
->tag('container.hot_path')
9690
;
9791
}
9892
};

0 commit comments

Comments
 (0)