Skip to content

Commit 4ce2df9

Browse files
committed
Compatibility with doctrine/annotations 2
1 parent 5c9b129 commit 4ce2df9

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

Tests/Loader/AnnotationClassLoaderWithAnnotationsTest.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,9 @@ protected function configureRoute(Route $route, \ReflectionClass $class, \Reflec
2626
{
2727
}
2828
};
29-
AnnotationRegistry::registerLoader('class_exists');
29+
if (method_exists(AnnotationRegistry::class, 'registerLoader')) {
30+
AnnotationRegistry::registerLoader('class_exists');
31+
}
3032
}
3133

3234
public function testDefaultRouteName()

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
"symfony/yaml": "^4.4|^5.0|^6.0",
2727
"symfony/expression-language": "^4.4|^5.0|^6.0",
2828
"symfony/dependency-injection": "^4.4|^5.0|^6.0",
29-
"doctrine/annotations": "^1.12",
29+
"doctrine/annotations": "^1.12|^2",
3030
"psr/log": "^1|^2|^3"
3131
},
3232
"conflict": {

0 commit comments

Comments
 (0)