Skip to content

[Security] Relax return type on VoterInterface #42901

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 7, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .github/expected-missing-return-types.diff
Original file line number Diff line number Diff line change
Expand Up @@ -708,6 +708,16 @@ index eda4730004..00cfc5b9c7 100644
+ public function loadTokenBySeries(string $series): PersistentTokenInterface;

/**
diff --git a/src/Symfony/Component/Security/Core/Authorization/Voter/VoterInterface.php b/src/Symfony/Component/Security/Core/Authorization/Voter/VoterInterface.php
index 7e401c3ff3..6b446ff376 100644
--- a/src/Symfony/Component/Security/Core/Authorization/Voter/VoterInterface.php
+++ b/src/Symfony/Component/Security/Core/Authorization/Voter/VoterInterface.php
@@ -36,4 +36,4 @@ interface VoterInterface
* @return int either ACCESS_GRANTED, ACCESS_ABSTAIN, or ACCESS_DENIED
*/
- public function vote(TokenInterface $token, mixed $subject, array $attributes);
+ public function vote(TokenInterface $token, mixed $subject, array $attributes): int;
}
diff --git a/src/Symfony/Component/Security/Core/Exception/AuthenticationException.php b/src/Symfony/Component/Security/Core/Exception/AuthenticationException.php
index 606c812fad..040c641bd7 100644
--- a/src/Symfony/Component/Security/Core/Exception/AuthenticationException.php
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,5 @@ interface VoterInterface
*
* @return int either ACCESS_GRANTED, ACCESS_ABSTAIN, or ACCESS_DENIED
*/
public function vote(TokenInterface $token, mixed $subject, array $attributes): int;
public function vote(TokenInterface $token, mixed $subject, array $attributes);
}