8000 [FrameworkBundle] restore call to addGlobalIgnoredName · symfony/symfony@115588c · GitHub
[go: up one dir, main page]

Skip to content

Commit 115588c

Browse files
alexislefebvrejvmanji
authored andcommitted
[FrameworkBundle] restore call to addGlobalIgnoredName
1 parent dc41890 commit 115588c

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1631,11 +1631,14 @@ private function registerAnnotationsConfiguration(array $config, ContainerBuilde
16311631

16321632
$loader->load('annotations.php');
16331633

1634+
// registerUniqueLoader exists since doctrine/annotations v1.6
16341635
if (!method_exists(AnnotationRegistry::class, 'registerUniqueLoader')) {
1636+
// registerLoader exists only in doctrine/annotations v1
16351637
if (method_exists(AnnotationRegistry::class, 'registerLoader')) {
16361638
$container->getDefinition('annotations.dummy_registry')
16371639
->setMethodCalls([['registerLoader', ['class_exists']]]);
16381640
} else {
1641+
// remove the dummy registry when doctrine/annotations v2 is used
16391642
$container->removeDefinition('annotations.dummy_registry');
16401643
}
16411644
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
->set('annotations.reader', AnnotationReader::class)
2727
->call('addGlobalIgnoredName', [
2828
'required',
29-
service('annotations.dummy_registry')->ignoreOnInvalid(), // dummy arg to register class_exists as annotation loader only when required
29+
service('annotations.dummy_registry')->nullOnInvalid(), // dummy arg to register class_exists as annotation loader only when required
3030
])
3131

3232
->set('annotations.dummy_registry', AnnotationRegistry::class)

0 commit comments

Comments
 (0)
0