Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 3545102

Browse filesBrowse files
alexislefebvrenicolas-grekas
authored andcommitted
[FrameworkBundle] restore call to addGlobalIgnoredName
1 parent 7037e46 commit 3545102
Copy full SHA for 3545102

File tree

Expand file treeCollapse file tree

2 files changed

+4
-1
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+4
-1
lines changed

‎DependencyInjection/FrameworkExtension.php

Copy file name to clipboardExpand all lines: DependencyInjection/FrameworkExtension.php
+3Lines 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
}

‎Resources/config/annotations.php

Copy file name to clipboardExpand all lines: Resources/config/annotations.php
+1-1Lines 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)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.