From 7338429c0535619ac64b657a797884668c8bae27 Mon Sep 17 00:00:00 2001 From: Joshua Thijssen Date: Mon, 13 Mar 2023 13:18:55 +0100 Subject: [PATCH 1/2] Call annotation loader only if it exists --- Tests/bootstrap.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Tests/bootstrap.php b/Tests/bootstrap.php index 5c97958..536b531 100644 --- a/Tests/bootstrap.php +++ b/Tests/bootstrap.php @@ -16,8 +16,8 @@ function includeIfExists($file) 'php composer.phar install'.PHP_EOL); } -if (class_exists('Doctrine\Common\Annotations\AnnotationRegistry')) { - \Doctrine\Common\Annotations\AnnotationRegistry::registerLoader(array($loader, 'loadClass')); +if (method_exists(AnnotationRegistry::class, 'registerLoader')) { + AnnotationRegistry::registerLoader('class_exists'); } // force loading the XRateLimit annotation since the composer target-dir autoloader does not run through $loader::loadClass From 84c9f3d890e40bc126ce1ca537cb5dbdeab5e429 Mon Sep 17 00:00:00 2001 From: Joshua Thijssen Date: Mon, 13 Mar 2023 13:21:21 +0100 Subject: [PATCH 2/2] added namespace --- Tests/bootstrap.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Tests/bootstrap.php b/Tests/bootstrap.php index 536b531..eee59a5 100644 --- a/Tests/bootstrap.php +++ b/Tests/bootstrap.php @@ -1,5 +1,7 @@