diff --git a/src/GedmoExtensionsServiceProvider.php b/src/GedmoExtensionsServiceProvider.php index f48cd07..b241817 100644 --- a/src/GedmoExtensionsServiceProvider.php +++ b/src/GedmoExtensionsServiceProvider.php @@ -9,6 +9,7 @@ use Illuminate\Support\ServiceProvider; use LaravelDoctrine\Fluent\Extensions\GedmoExtensions; use LaravelDoctrine\Fluent\FluentDriver; +use function method_exists; class GedmoExtensionsServiceProvider extends ServiceProvider { @@ -82,7 +83,9 @@ private function registerGedmoForAnnotations(MappingDriverChain $chain) ); } - AnnotationRegistry::registerUniqueLoader('class_exists'); + if (method_exists(AnnotationRegistry::class, 'registerUniqueLoader')) { + AnnotationRegistry::registerUniqueLoader('class_exists'); + } } /**