Skip to content

Commit

Permalink
feat: remove the required identifiers constraints as we should allow …
Browse files Browse the repository at this point in the history
…a resource the provider to return a resource even if no identifier are provided
  • Loading branch information
johnkrovitch committed Nov 13, 2024
1 parent ba7bb4b commit 1a94019
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 58 deletions.
2 changes: 0 additions & 2 deletions src/Resource/Metadata/Operation.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,8 @@

use LAG\AdminBundle\Bridge\Doctrine\ORM\State\Processor\ORMProcessor;
use LAG\AdminBundle\Bridge\Doctrine\ORM\State\Provider\ORMProvider;
use LAG\AdminBundle\Validation\Constraint\AtLeastOneIdentifier;
use Symfony\Component\Validator\Constraints as Assert;

#[AtLeastOneIdentifier]
abstract class Operation implements OperationInterface
{
private ?Resource $resource = null;
Expand Down
2 changes: 1 addition & 1 deletion src/Resource/Metadata/Update.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public function __construct(
?string $controller = ResourceController::class,
?string $route = null,
?array $routeParameters = null,
array $methods = ['POST', 'GET'],
array $methods = ['POST', 'PUT', 'GET'],
?string $path = null,
?string $redirectRoute = null,
?array $redirectRouteParameters = null,
Expand Down
21 changes: 0 additions & 21 deletions src/Validation/Constraint/AtLeastOneIdentifier.php

This file was deleted.

34 changes: 0 additions & 34 deletions src/Validation/Constraint/AtLeastOneIdentifierValidator.php

This file was deleted.

0 comments on commit 1a94019

Please sign in to comment.