diff --git a/composer.json b/composer.json index 6632c53..0c8cb07 100644 --- a/composer.json +++ b/composer.json @@ -44,7 +44,7 @@ "contributte/event-dispatcher": "^0.9", "cweagans/composer-patches": "^1.7", "fastybird/datetime-factory": "^0.6", - "ipub/doctrine-crud": "^4.0", + "ipub/doctrine-crud": "^5.0", "ipub/doctrine-orm-query": "^0.1", "ipub/slim-router": "^0.2.0", "latte/latte" : "^3.0", diff --git a/src/Models/Policies/Manager.php b/src/Models/Policies/Manager.php index c9d9009..89f56ba 100644 --- a/src/Models/Policies/Manager.php +++ b/src/Models/Policies/Manager.php @@ -47,6 +47,11 @@ public function __construct( { } + /** + * @throws DoctrineCrudExceptions\EntityCreation + * @throws DoctrineCrudExceptions\InvalidArgument + * @throws DoctrineCrudExceptions\InvalidState + */ public function create(Utils\ArrayHash $values): Entities\Policies\Policy { $entity = $this->getEntityCrud()->getEntityCreator()->create($values); @@ -56,7 +61,8 @@ public function create(Utils\ArrayHash $values): Entities\Policies\Policy } /** - * @throws DoctrineCrudExceptions\InvalidArgumentException + * @throws DoctrineCrudExceptions\InvalidArgument + * @throws DoctrineCrudExceptions\InvalidState */ public function update( Entities\Policies\Policy $entity, @@ -70,7 +76,8 @@ public function update( } /** - * @throws DoctrineCrudExceptions\InvalidArgumentException + * @throws DoctrineCrudExceptions\InvalidArgument + * @throws DoctrineCrudExceptions\InvalidState */ public function delete(Entities\Policies\Policy $entity): bool { diff --git a/src/Models/Tokens/Manager.php b/src/Models/Tokens/Manager.php index 3117b8c..4767cd6 100644 --- a/src/Models/Tokens/Manager.php +++ b/src/Models/Tokens/Manager.php @@ -47,6 +47,11 @@ public function __construct( { } + /** + * @throws DoctrineCrudExceptions\EntityCreation + * @throws DoctrineCrudExceptions\InvalidArgument + * @throws DoctrineCrudExceptions\InvalidState + */ public function create(Utils\ArrayHash $values): Entities\Tokens\Token { $entity = $this->getEntityCrud()->getEntityCreator()->create($values); @@ -56,7 +61,8 @@ public function create(Utils\ArrayHash $values): Entities\Tokens\Token } /** - * @throws DoctrineCrudExceptions\InvalidArgumentException + * @throws DoctrineCrudExceptions\InvalidArgument + * @throws DoctrineCrudExceptions\InvalidState */ public function update( Entities\Tokens\Token $entity, @@ -70,7 +76,8 @@ public function update( } /** - * @throws DoctrineCrudExceptions\InvalidArgumentException + * @throws DoctrineCrudExceptions\InvalidArgument + * @throws DoctrineCrudExceptions\InvalidState */ public function delete(Entities\Tokens\Token $entity): bool { diff --git a/tests/cases/unit/Casbin/DatabaseTest.php b/tests/cases/unit/Casbin/DatabaseTest.php index 5cd4f4a..0811ca1 100644 --- a/tests/cases/unit/Casbin/DatabaseTest.php +++ b/tests/cases/unit/Casbin/DatabaseTest.php @@ -32,7 +32,9 @@ public function setUp(): void /** * @throws Casbin\Exceptions\CasbinException * @throws DI\MissingServiceException - * @throws DoctrineCrudExceptions\InvalidArgumentException + * @throws DoctrineCrudExceptions\EntityCreation + * @throws DoctrineCrudExceptions\InvalidArgument + * @throws DoctrineCrudExceptions\InvalidState * @throws DoctrineOrmQueryExceptions\InvalidStateException * @throws DoctrineOrmQueryExceptions\QueryException * @throws Exceptions\InvalidState diff --git a/tests/cases/unit/Models/PoliciesRepositoryTest.php b/tests/cases/unit/Models/PoliciesRepositoryTest.php index 4406bd4..cbe3d80 100644 --- a/tests/cases/unit/Models/PoliciesRepositoryTest.php +++ b/tests/cases/unit/Models/PoliciesRepositoryTest.php @@ -27,10 +27,11 @@ public function setUp(): void /** * @throws DI\MissingServiceException - * @throws DoctrineCrudExceptions\InvalidArgumentException + * @throws DoctrineCrudExceptions\EntityCreation + * @throws DoctrineCrudExceptions\InvalidArgument + * @throws DoctrineCrudExceptions\InvalidState * @throws DoctrineOrmQueryExceptions\InvalidStateException * @throws DoctrineOrmQueryExceptions\QueryException - * @throws DoctrineCrudExceptions\InvalidArgumentException * @throws ORM\Tools\ToolsException */ public function testPolicyEntity(): void @@ -88,6 +89,9 @@ public function testPolicyEntity(): void /** * @throws DI\MissingServiceException + * @throws DoctrineCrudExceptions\EntityCreation + * @throws DoctrineCrudExceptions\InvalidArgument + * @throws DoctrineCrudExceptions\InvalidState * @throws Exceptions\InvalidState * @throws ORM\Tools\ToolsException */ diff --git a/tests/cases/unit/Models/TokensRepositoryTest.php b/tests/cases/unit/Models/TokensRepositoryTest.php index 53ffb21..25e6233 100644 --- a/tests/cases/unit/Models/TokensRepositoryTest.php +++ b/tests/cases/unit/Models/TokensRepositoryTest.php @@ -17,10 +17,11 @@ final class TokensRepositoryTest extends BaseTestCase /** * @throws DI\MissingServiceException - * @throws DoctrineCrudExceptions\InvalidArgumentException + * @throws DoctrineCrudExceptions\EntityCreation + * @throws DoctrineCrudExceptions\InvalidArgument + * @throws DoctrineCrudExceptions\InvalidState * @throws DoctrineOrmQueryExceptions\InvalidStateException * @throws DoctrineOrmQueryExceptions\QueryException - * @throws DoctrineCrudExceptions\InvalidArgumentException * @throws ORM\Tools\ToolsException */ public function testTokenEntity(): void