-
-
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -83,7 +83,7 @@ public function tes 10000 tRetrieveUserReturnsUserFromTokenOnReauthentication() | |
$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 commentThe reason will be displayed to describe this comment to others. Learn more. 💡 |
||
$result = $reflection->invoke($provider, 'someUser', $token); | ||
|
||
$this->assertSame($user, $result); | ||
} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 commentThe reason will be displayed to describe this comment to others. Learn more. 💡 This change to |
||
{ | ||
throw new \LogicException('The PreAuthenticationGuardToken is *never* 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.
💡 These changes to
doctrine-bridge
5 break compatibility withsecurity-core
4.4, thus the bump in composer.json. Can be reverted and re-applied later, if you don't want to bump yet.