Browse Source

Suppression deprecated lié au Voter

Sangfroid 1 week ago
parent
commit
a36401f16d
1 changed files with 2 additions and 1 deletions
  1. 2 1
      src/Security/Voter/ArticleVoter.php

+ 2 - 1
src/Security/Voter/ArticleVoter.php

@@ -6,6 +6,7 @@ use App\Entity\Article;
 use App\Entity\User;
 use Symfony\Bundle\SecurityBundle\Security;
 use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
+use Symfony\Component\Security\Core\Authorization\Voter\Vote;
 use Symfony\Component\Security\Core\Authorization\Voter\Voter;
 
 final class ArticleVoter extends Voter
@@ -30,7 +31,7 @@ final class ArticleVoter extends Voter
             && $subject instanceof \App\Entity\Article;
     }
 
-    protected function voteOnAttribute(string $attribute, mixed $subject, TokenInterface $token): bool
+    protected function voteOnAttribute(string $attribute, mixed $subject, TokenInterface $token, ?Vote $vote = null): bool
     {
         $user = $token->getUser();