|
16 | 16 | use Doctrine\Common\Annotations\CachedReader; |
17 | 17 | use Doctrine\Common\Annotations\PsrCachedReader; |
18 | 18 | use Doctrine\Common\Annotations\Reader; |
| 19 | +use Doctrine\Common\Cache\Psr6\DoctrineProvider; |
19 | 20 | use Symfony\Bundle\FrameworkBundle\CacheWarmer\AnnotationsCacheWarmer; |
20 | 21 | use Symfony\Component\Cache\Adapter\ArrayAdapter; |
21 | 22 | use Symfony\Component\Cache\Adapter\FilesystemAdapter; |
22 | 23 | use Symfony\Component\Cache\Adapter\PhpArrayAdapter; |
23 | | -use Symfony\Component\Cache\DoctrineProvider; |
24 | 24 |
|
25 | 25 | return static function (ContainerConfigurator $container) { |
26 | 26 | $container->services() |
|
36 | 36 | ->set('annotations.cached_reader', CachedReader::class) |
37 | 37 | ->args([ |
38 | 38 | service('annotations.reader'), |
39 | | - inline_service(DoctrineProvider::class)->args([ |
40 | | - inline_service(ArrayAdapter::class), |
41 | | - ]), |
| 39 | + inline_service(DoctrineProvider::class) |
| 40 | + ->factory([DoctrineProvider::class, 'wrap']) |
| 41 | + ->args([ |
| 42 | + inline_service(ArrayAdapter::class), |
| 43 | + ]), |
42 | 44 | abstract_arg('Debug-Flag'), |
43 | 45 | ]) |
44 | 46 |
|
|
50 | 52 | ]) |
51 | 53 |
|
52 | 54 | ->set('annotations.filesystem_cache', DoctrineProvider::class) |
| 55 | + ->factory([DoctrineProvider::class, 'wrap']) |
53 | 56 | ->args([ |
54 | 57 | service('annotations.filesystem_cache_adapter'), |
55 | 58 | ]) |
|
71 | 74 | ->tag('container.hot_path') |
72 | 75 |
|
73 | 76 | ->set('annotations.cache', DoctrineProvider::class) |
| 77 | + ->factory([DoctrineProvider::class, 'wrap']) |
74 | 78 | ->args([ |
75 | 79 | service('annotations.cache_adapter'), |
76 | 80 | ]) |
|
0 commit comments