From 4ce2df9a469c19ba45ca6aca04fec1c358a6e791 Mon Sep 17 00:00:00 2001 From: "Alexander M. Turek" Date: Tue, 20 Dec 2022 12:08:14 +0100 Subject: [PATCH] Compatibility with doctrine/annotations 2 --- Tests/Loader/AnnotationClassLoaderWithAnnotationsTest.php | 4 +++- composer.json | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Tests/Loader/AnnotationClassLoaderWithAnnotationsTest.php b/Tests/Loader/AnnotationClassLoaderWithAnnotationsTest.php index b7399df3..e2843a0a 100644 --- a/Tests/Loader/AnnotationClassLoaderWithAnnotationsTest.php +++ b/Tests/Loader/AnnotationClassLoaderWithAnnotationsTest.php @@ -26,7 +26,9 @@ protected function configureRoute(Route $route, \ReflectionClass $class, \Reflec { } }; - AnnotationRegistry::registerLoader('class_exists'); + if (method_exists(AnnotationRegistry::class, 'registerLoader')) { + AnnotationRegistry::registerLoader('class_exists'); + } } public function testDefaultRouteName() diff --git a/composer.json b/composer.json index b978c062..b21ad5f2 100644 --- a/composer.json +++ b/composer.json @@ -26,7 +26,7 @@ "symfony/yaml": "^4.4|^5.0|^6.0", "symfony/expression-language": "^4.4|^5.0|^6.0", "symfony/dependency-injection": "^4.4|^5.0|^6.0", - "doctrine/annotations": "^1.12", + "doctrine/annotations": "^1.12|^2", "psr/log": "^1|^2|^3" }, "conflict": {