Skip to content

Commit

Permalink
Merge pull request #64 from laravel-doctrine/fix-537
Browse files Browse the repository at this point in the history
Automatic loading of annotations was added in doctrine/annotations
  • Loading branch information
eigan authored Jan 21, 2023
2 parents 4395781 + 20aaee7 commit 5426f79
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 44 deletions.
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@
"illuminate/config": "^6.0|^7.0|^8.0|^9.0",
"illuminate/contracts": "^6.0|^7.0|^8.0|^9.0",
"illuminate/support": "^6.0|^7.0|^8.0|^9.0",
"laravel-doctrine/orm": "^1"
"laravel-doctrine/orm": "^1",
"doctrine/annotations": "^1.10"
},
"require-dev": {
"mockery/mockery": "^1.3.1",
Expand Down
14 changes: 1 addition & 13 deletions src/AclServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
use Illuminate\Support\ServiceProvider;
use Illuminate\Support\Str;
use LaravelDoctrine\ACL\Contracts\HasPermissions;
use LaravelDoctrine\ACL\Mappings\AnnotationLoader;
use LaravelDoctrine\ACL\Permissions\PermissionManager;
use LaravelDoctrine\ORM\DoctrineManager;

Expand Down Expand Up @@ -39,7 +38,7 @@ public function boot()
public function register()
{
$this->mergeConfig();
$this->registerAnnotations();
AnnotationRegistry::registerUniqueLoader('class_exists');

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

/**
* Register annotations.
*/
protected function registerAnnotations()
{
AnnotationRegistry::registerLoader([
new AnnotationLoader,
'loadClass',
]);
}

/**
* Merge config.
*/
Expand Down
30 changes: 0 additions & 30 deletions src/Mappings/AnnotationLoader.php

This file was deleted.

0 comments on commit 5426f79

Please sign in to comment.