Skip to content

Commit

Permalink
Trying to fix memory leak (#14)
Browse files Browse the repository at this point in the history
* Trying to fix memory leak

* Fixing entity mapping
  • Loading branch information
akadlec authored Jul 23, 2024
1 parent 722f011 commit 62eead2
Show file tree
Hide file tree
Showing 14 changed files with 487 additions and 143 deletions.
5 changes: 1 addition & 4 deletions src/DI/SimpleAuthExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -160,10 +160,7 @@ public function loadConfiguration(): void
$this->prefix('casbin.adapter'),
new DI\Definitions\ServiceDefinition(),
)
->setType(SimpleAuth\Models\Casbin\Adapter::class)
->setArguments([
'policyFile' => $configuration->casbin->policy,
]);
->setType(SimpleAuth\Models\Casbin\Adapter::class);

$builder->addDefinition($this->prefix('casbin.subscriber'), new DI\Definitions\ServiceDefinition())
->setType(Subscribers\Policy::class);
Expand Down
2 changes: 2 additions & 0 deletions src/Entities/Policies/Policy.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@
class Policy implements DoctrineCrud\Entities\IEntity
{

public const TYPE = 'policy';

#[ORM\Id]
#[ORM\Column(name: 'policy_id', type: Uuid\Doctrine\UuidBinaryType::NAME)]
#[ORM\CustomIdGenerator(class: Uuid\Doctrine\UuidGenerator::class)]
Expand Down
Loading

0 comments on commit 62eead2

Please sign in to comment.