8000 Fix UserProvider PHPStan Generic update for PasswordUpgraderInterface by alexander-schranz · Pull Request #7872 · sulu/sulu · GitHub
[go: up one dir, main page]

Skip to content

Fix UserProvider PHPStan Generic update for PasswordUpgraderInterface #7872

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

Conversation

alexander-schranz
Copy link
Member
Q A
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Fixed tickets fixes #
Related issues/PRs #
License MIT
Documentation PR sulu/sulu-docs#

What's in this PR?

Remove generic definitions for PasswordUpgraderInterface as it was removed from Symfony core.

Why?

Not longer generic: symfony/symfony#51283

@@ -127,7 +126,7 @@ public function supportsClass($class): bool

public function upgradePassword(PasswordAuthenticatedUserInterface $user, string $newHashedPassword): void
{
if (!$user instanceof User) { // @phpstan-ignore-line we can not be 100% sure about this but generic forces us to check
Copy link
Member Author

Choose a reason for hiding this comment

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

Interesting is we didn't here either not trust the PHPStan generic and added a check already.

@alexander-schranz alexander-schranz added the DX Affecting the end developer label Mar 28, 2025
@alexander-schranz alexander-schranz merged commit 6f9380b into sulu:2.6 Mar 28, 2025
9 checks passed
@alexander-schranz alexander-schranz deleted the enhancement/phpstan-improvement-user-provider branch March 28, 2025 15:11
@mamazu
Copy link
Contributor
mamazu commented Mar 28, 2025

This is related to #7743

In more modern version Symfony doesn't need a salt and this means a different interface.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DX Affecting the end developer
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0