Skip to content

Commit

Permalink
registerUniqueLoader is removed in doctrine/annotations 2.0
Browse files Browse the repository at this point in the history
Still call for those running 1.0
  • Loading branch information
eigan committed Aug 9, 2023
1 parent d90f999 commit ef3d8b1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/GedmoExtensionsServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down Expand Up @@ -82,7 +83,9 @@ private function registerGedmoForAnnotations(MappingDriverChain $chain)
);
}

AnnotationRegistry::registerUniqueLoader('class_exists');
if (method_exists(AnnotationRegistry::class, 'registerUniqueLoader')) {
AnnotationRegistry::registerUniqueLoader('class_exists');
}
}

/**
Expand Down

0 comments on commit ef3d8b1

Please sign in to comment.