-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Security] Add generic to UserProviderInterface #50399
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
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
stof
requested changes
May 23, 2023
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.
You should add the proper @template-implements
on implementations.
src/Symfony/Component/Security/Core/User/AttributesBasedUserProviderInterface.php
Outdated
Show resolved
Hide resolved
src/Symfony/Component/Security/Core/User/UserProviderInterface.php
Outdated
Show resolved
Hide resolved
src/Symfony/Component/Security/Core/User/UserProviderInterface.php
Outdated
Show resolved
Hide resolved
This will be for 6.4, not for 6.3 (we are 2 months after the feature freeze) |
c3fc7e9
to
6f75352
Compare
stof
requested changes
May 23, 2023
src/Symfony/Component/Security/Core/User/AttributesBasedUserProviderInterface.php
Outdated
Show resolved
Hide resolved
src/Symfony/Component/Security/Core/User/MissingUserProvider.php
Outdated
Show resolved
Hide resolved
src/Symfony/Component/Security/Core/User/UserProviderInterface.php
Outdated
Show resolved
Hide resolved
src/Symfony/Component/Security/Core/User/UserProviderInterface.php
Outdated
Show resolved
Hide resolved
src/Symfony/Component/Security/Core/User/InMemoryUserProvider.php
Outdated
Show resolved
Hide resolved
Hi @stof, is it ok for you now ? |
derrabus
reviewed
Jul 27, 2023
src/Symfony/Component/Security/Core/User/MissingUserProvider.php
Outdated
Show resolved
Hide resolved
42476d4
to
7ee64db
Compare
nicolas-grekas
approved these changes
Aug 1, 2023
wouterj
reviewed
Aug 1, 2023
src/Symfony/Bridge/Doctrine/Security/User/EntityUserProvider.php
Outdated
Show resolved
Hide resolved
10cd4cc
to
81ad053
Compare
81ad053
to
ba46f32
Compare
Thank you @VincentLanglet. |
fabpot
added a commit
that referenced
this pull request
Aug 5, 2023
… (wouterj) This PR was merged into the 6.4 branch. Discussion ---------- [Security] Do not make PasswordUpgraderInterface a generic | Q | A | ------------- | --- | Branch? | 6.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | Ref #50399 (comment) | License | MIT | Doc PR | - Making `PasswordUpgraderInterface` a generic in 6.3 (#48750) was a mistake. Nothing guarantees that the calling side will only pass `TUser` into the `upgradePassword()` method, as there is no way to check which users are supported. Passing a potentially unsupported user is expected behavior and we document in the PHPdoc that the method should silently fail in such cases. The referenced GitHub discussion contains some more details. Removing the generic from the interface creates a static analysis failure in both [Psalm](https://psalm.dev/r/c86a59ab67) and [PHPstan](https://phpstan.org/r/3c85447a-533c-4196-b0c8-730687c497cc). For this reason, I selected the 6.4 branch although this is a bug fix for 6.3. I'm fine with merging this in 6.3 as well, if this feels better. Commits ------- d473b90 [Security] Do not make PasswordUpgraderInterface a generic
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Similar to #48750 @nicolas-grekas