Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.6k
[Security] Lazy load user providers#23295
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
chalasr commentedJun 25, 2017
Q | A |
---|---|
Branch? | 3.4 |
Bug fix? | no |
New feature? | yes |
BC breaks? | no |
Deprecations? | no |
Tests pass? | yes |
Fixed tickets | n/a |
License | MIT |
Doc PR | n/a |
build failure with high deps is normal |
/** | ||
* @param iterable $providers | ||
*/ | ||
public function __construct(/* iterable */ $providers) |
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.
the comment should be removed
@@ -44,7 +44,7 @@ class ContextListener implements ListenerInterface | |||
private $registered; | |||
private $trustResolver; | |||
public function __construct(TokenStorageInterface $tokenStorage,array $userProviders, $contextKey, LoggerInterface $logger = null, EventDispatcherInterface $dispatcher = null, AuthenticationTrustResolverInterface $trustResolver = null) | |||
public function __construct(TokenStorageInterface $tokenStorage,/* iterable */ $userProviders, $contextKey, LoggerInterface $logger = null, EventDispatcherInterface $dispatcher = null, AuthenticationTrustResolverInterface $trustResolver = null) |
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.
comment to be removed, that's the job of a docblock, we should not follow this practice IMHO
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.
with minor comments
e52986c
to70bcfe2
Compare@nicolas-grekas comments addressed. build failure unrelated (see#23360) |
@@ -47,19 +47,6 @@ public function testItRequiresContextKey() | |||
); | |||
} | |||
/** | |||
* @expectedException \InvalidArgumentException | |||
* @expectedExceptionMessage User provider "stdClass" must implement "Symfony\Component\Security\Core\User\UserProviderInterface |
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.
we should still have a test covering this case. You have not removed the exception entirely. You just moved it later in the usage.
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.
test readded
ready. |
* @param EventDispatcherInterface|null $dispatcher | ||
* @param AuthenticationTrustResolverInterface|null $trustResolver | ||
*/ | ||
public function __construct(TokenStorageInterface $tokenStorage, $userProviders, $contextKey, LoggerInterface $logger = null, EventDispatcherInterface $dispatcher = null, AuthenticationTrustResolverInterface $trustResolver = null) |
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.
full docblock to be removed +iterable
typehint to be added to the$userProviders
arg when merging into master.
/** | ||
* @param iterable|UserProviderInterface[] $providers | ||
*/ | ||
public function __construct($providers) |
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.
same, docblock to typehint when merging into master
Thank you@chalasr. |
This PR was merged into the 3.4 branch.Discussion----------[Security] Lazy load user providers| Q | A| ------------- | ---| Branch? | 3.4| Bug fix? | no| New feature? | yes| BC breaks? | no| Deprecations? | no| Tests pass? | yes| Fixed tickets | n/a| License | MIT| Doc PR | n/aCommits-------d7914a6 [Security] Lazy load user providers