Skip to content

Commit 20aaee7

Browse files
committed
Automatic loading of annotations was added in doctrine/annotations
Using a custom loader will disable automatic loading of annotation and might break other un-imported annotations. https://github.com/doctrine/annotations/releases/tag/1.10.0
1 parent 4395781 commit 20aaee7

File tree

3 files changed

+3
-44
lines changed

3 files changed

+3
-44
lines changed

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@
2828
"illuminate/config": "^6.0|^7.0|^8.0|^9.0",
2929
"illuminate/contracts": "^6.0|^7.0|^8.0|^9.0",
3030
"illuminate/support": "^6.0|^7.0|^8.0|^9.0",
31-
"laravel-doctrine/orm": "^1"
31+
"laravel-doctrine/orm": "^1",
32+
"doctrine/annotations": "^1.10"
3233
},
3334
"require-dev": {
3435
"mockery/mockery": "^1.3.1",

src/AclServiceProvider.php

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
use Illuminate\Support\ServiceProvider;
88
use Illuminate\Support\Str;
99
use LaravelDoctrine\ACL\Contracts\HasPermissions;
10-
use LaravelDoctrine\ACL\Mappings\AnnotationLoader;
1110
use LaravelDoctrine\ACL\Permissions\PermissionManager;
1211
use LaravelDoctrine\ORM\DoctrineManager;
1312

@@ -39,7 +38,7 @@ public function boot()
3938
public function register()
4039
{
4140
$this->mergeConfig();
42-
$this->registerAnnotations();
41+
AnnotationRegistry::registerUniqueLoader('class_exists');
4342

4443
$manager = $this->app->make(DoctrineManager::class);
4544
$manager->extendAll(RegisterMappedEventSubscribers::class);
@@ -60,17 +59,6 @@ protected function definePermissions(Gate $gate, PermissionManager $manager)
6059
}
6160
}
6261

63-
/**
64-
* Register annotations.
65-
*/
66-
protected function registerAnnotations()
67-
{
68-
AnnotationRegistry::registerLoader([
69-
new AnnotationLoader,
70-
'loadClass',
71-
]);
72-
}
73-
7462
/**
7563
* Merge config.
7664
*/

src/Mappings/AnnotationLoader.php

Lines changed: 0 additions & 30 deletions
This file was deleted.

0 commit comments

Comments
 (0)