From f01584348699ce54a261c02e2a1d2e9c90c601b4 Mon Sep 17 00:00:00 2001 From: Alexander Schranz Date: Tue, 16 Jul 2024 12:53:13 +0200 Subject: [PATCH] Run annotation registry only when available --- tests/bootstrap.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/bootstrap.php b/tests/bootstrap.php index 388c0e9..37f15b1 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -11,6 +11,8 @@ require __DIR__ . '/app/TestKernel.php'; -AnnotationRegistry::registerLoader([$loader, 'loadClass']); +if (\class_exists(AnnotationRegistry::class)) { + AnnotationRegistry::registerLoader([$loader, 'loadClass']); +} return $loader;