Skip to content

Commit f392dbd

Browse files
authored
Merge pull request #1113 from overblog/Vincz-patch-1
Ensure registerLoader method exists on AnnotationReader
2 parents f33382a + 9f9f501 commit f392dbd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Config/Parser/AnnotationParser.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public static function getAnnotationReader(): Reader
4646
throw new ServiceNotFoundException("In order to use annotations, you need to install 'symfony/cache' first. See: 'https://symfony.com/doc/current/components/cache.html'");
4747
}
4848

49-
if (class_exists(AnnotationRegistry::class)) {
49+
if (class_exists(AnnotationRegistry::class) && method_exists(AnnotationRegistry::class, 'registerLoader')) {
5050
AnnotationRegistry::registerLoader('class_exists');
5151
}
5252
$cacheKey = md5(__DIR__);

0 commit comments

Comments
 (0)