diff --git a/lib/Doctrine/Common/Annotations/AnnotationRegistry.php b/lib/Doctrine/Common/Annotations/AnnotationRegistry.php index 13abaf50d..e26a2117e 100644 --- a/lib/Doctrine/Common/Annotations/AnnotationRegistry.php +++ b/lib/Doctrine/Common/Annotations/AnnotationRegistry.php @@ -166,6 +166,10 @@ public static function loadAnnotationClass(string $class) : bool return true; } } + + if (self::$loaders === [] && self::$autoloadNamespaces === [] && \class_exists($class)) { + return true; + } self::$failedToAutoload[$class] = null;