Skip to content

[PasswordHasher] Fix missing PasswordHasherAwareInterface allowed type #41678

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
Jun 11, 2021

Conversation

chalasr
Copy link
Member

@chalasr chalasr commented Jun 11, 2021

Q A
Branch? 5.3
Bug fix? yes
New feature? no
Deprecations? no
Tickets -
License MIT
Doc PR -

Also backports test changes from #41640

@@ -26,7 +25,7 @@ interface PasswordHasherFactoryInterface
/**
* Returns the password hasher to use for the given user.
*
* @param PasswordAuthenticatedUserInterface|UserInterface|string $user A PasswordAuthenticatedUserInterface/UserInterface instance or a class name
* @param PasswordHasherAwareInterface|PasswordAuthenticatedUserInterface|string $user A PasswordAuthenticatedUserInterface/PasswordHasherAwareInterface instance or a class name
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

UserInterface is the legacy type here - which we don't document usually

@chalasr chalasr force-pushed the fix-passwordhasheraware-miss branch from c1d40d3 to 8d3bea5 Compare June 11, 2021 13:11
@chalasr chalasr merged commit 4988db2 into symfony:5.3 Jun 11, 2021
@chalasr chalasr deleted the fix-passwordhasheraware-miss branch June 11, 2021 13:30
chalasr added a commit that referenced this pull request Jun 11, 2021
…e from UserPasswordHasherInterface API (chalasr)

This PR was merged into the 5.3 branch.

Discussion
----------

[PasswordHasher] Remove PasswordHasherAwareInterface type from UserPasswordHasherInterface API

| Q             | A
| ------------- | ---
| Branch?       | 5.3
| Bug fix?      | no (not yet released)
| New feature?  | no
| Deprecations? | no
| Tickets       | -
| License       | MIT
| Doc PR        | -

As spotted by `@stof` in #41640 (comment), the methods of this interface should not handle user classes/instances that are not implementing `PasswordAuthenticatedUserInterface`.
This reverts that part from #41678 (not released yet).

Commits
-------

596ba78 [PasswordHasher] Remove PasswordHasherAwareInterface from UserPasswordHasherInterface API
@fabpot fabpot mentioned this pull request Jun 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants