Skip to content

[Security] Fix type in upgradePassword #20990

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
May 23, 2025
Merged

Conversation

Synxgz
Copy link
Contributor

@Synxgz Synxgz commented May 23, 2025

Fix the wrong type for the method upgradePassword according to PasswordUpgraderInterface.

It is wrong since the 6.0, the signature has changed from PasswordAuthenticatedUserInterface|UserInterface to PasswordAuthenticatedUserInterface in PasswordUpgraderInterface.

Commit: symfony/symfony@30e2c00#diff-b31195679b81d7a86cf868774ef3bf74a79e8e059250db399531b989b4919bdeL17

Prevents PHP Error :

Compile Error: Declaration of App\Services\Security\EmailUserProvider::upgradePassword(Symfony\Component\Security\Core\User\UserInterface $user, string $newHashedPassword): void must be compatible with Symfony\Component\Security\Core\User\PasswordUpgraderInterface::upgradePassword(Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface $user, string $newHashedPassword): void

@javiereguiluz
Copy link
Member

Good catch Romain! Thanks ... and congrats on your first Symfony Docs contribution 🎉

@javiereguiluz javiereguiluz merged commit 6e01dc1 into symfony:6.4 May 23, 2025
3 checks passed
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.

4 participants