-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Security] Added type-hints to auth providers, tokens and voters #32351
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
Conversation
@@ -58,7 +58,7 @@ public function getCredentials() | ||
return $this->credentials; | ||
} | ||
|
||
public function setAuthenticated($authenticated) | ||
public function setAuthenticated(bool $authenticated) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 This change to security-guard
5 breaks compatibility with security-core
4.4, thus the bump in composer.json. Can be reverted and re-applied later, if you don't want to bump yet.
@@ -83,7 +83,7 @@ public function testRetrieveUserReturnsUserFromTokenOnReauthentication() | ||
$provider = new DaoAuthenticationProvider($userProvider, $this->getMockBuilder('Symfony\\Component\\Security\\Core\\User\\UserCheckerInterface')->getMock(), 'key', $this->getMockBuilder('Symfony\\Component\\Security\\Core\\Encoder\\EncoderFactoryInterface')->getMock()); | ||
$reflection = new \ReflectionMethod($provider, 'retrieveUser'); | ||
$reflection->setAccessible(true); | ||
$result = $reflection->invoke($provider, null, $token); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 null
shouldn't be a valid argument for the retrieveUser
method. The test only worked because the parameter is ignored on the execution path that is tested here.
5e680c2
to
8c46b95
Compare
@@ -48,7 +48,7 @@ public function __construct(Connection $conn) | ||
/** | ||
* {@inheritdoc} | ||
*/ | ||
public function loadTokenBySeries($series) | ||
public function loadTokenBySeries(string $series) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 These changes to doctrine-bridge
5 break compatibility with security-core
4.4, thus the bump in composer.json. Can be reverted and re-applied later, if you don't want to bump yet.
Thank you @derrabus. |
…d voters (derrabus) This PR was merged into the 5.0-dev branch. Discussion ---------- [Security] Added type-hints to auth providers, tokens and voters | Q | A | ------------- | --- | Branch? | master | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #32179 | License | MIT | Doc PR | N/A This PR adds type declarations to authentication providers, tokens and voters. Commits ------- 8c46b95 [Security] Added type-hints to auth providers, tokens and voters.
This PR adds type declarations to authentication providers, tokens and voters.