Skip to content

Commit 2855f38

Browse files
committed
fix annotations config xml to php migration
1 parent 2329a75 commit 2855f38

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

Resources/config/annotations.php

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,10 @@
2424
return static function (ContainerConfigurator $container) {
2525
$container->services()
2626
->set('annotations.reader', AnnotationReader::class)
27-
->call('addGlobalIgnoredName', ['', service('annotations.dummy_registry')])
27+
->call('addGlobalIgnoredName', [
28+
'required',
29+
service('annotations.dummy_registry'), // dummy arg to register class_exists as annotation loader only when required
30+
])
2831

2932
->set('annotations.dummy_registry', AnnotationRegistry::class)
3033
->call('registerUniqueLoader', ['class_exists'])
@@ -33,25 +36,25 @@
3336
->args([
3437
service('annotations.reader'),
3538
inline_service(ArrayCache::class),
36-
abstract_arg('debug flag'),
39+
abstract_arg('Debug-Flag'),
3740
])
3841

3942
->set('annotations.filesystem_cache', FilesystemCache::class)
4043
->args([
41-
abstract_arg('cache-directory'),
44+
abstract_arg('Cache-Directory'),
4245
])
4346

4447
->set('annotations.cache_warmer', AnnotationsCacheWarmer::class)
4548
->args([
4649
service('annotations.reader'),
4750
param('kernel.cache_dir').'/annotations.php',
48-
'#^Symfony\\(?:Component\\HttpKernel\\|Bundle\\FrameworkBundle\\Controller\\(?!.*Controller$))#',
51+
'#^Symfony\\\\(?:Component\\\\HttpKernel\\\\|Bundle\\\\FrameworkBundle\\\\Controller\\\\(?!.*Controller$))#',
4952
param('kernel.debug'),
5053
])
5154

5255
->set('annotations.cache', DoctrineProvider::class)
5356
->args([
54-
inline_service()
57+
inline_service(PhpArrayAdapter::class)
5558
->factory([PhpArrayAdapter::class, 'create'])
5659
->args([
5760
param('kernel.cache_dir').'/annotations.php',

0 commit comments

Comments
 (0)