Skip to content

Commit

Permalink
bug #8 Fix missing LegacyPasswordAuthenticatedUserInterface (coldic3)
Browse files Browse the repository at this point in the history
This PR was merged into the 1.1-dev branch.

Discussion
----------

I would like to take advantage of  which specifies  method with  return type. The existence of this interface is checked in Symfony in some places so if the interface exists, the salt will be used back 💃

Commits
-------

6d82669 Fix missing LegacyPasswordAuthenticatedUserInterface
  • Loading branch information
lchrusciel authored Dec 12, 2022
2 parents ed488dd + 6d82669 commit eeb3d83
Showing 1 changed file with 3 additions and 14 deletions.
17 changes: 3 additions & 14 deletions src/Core/User/UserInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace SyliusLabs\Polyfill\Symfony\Security\Core\User;

use Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface;
use Symfony\Component\Security\Core\User\LegacyPasswordAuthenticatedUserInterface;
use Symfony\Component\Security\Core\User\UserInterface as SymfonyUserInterface;

// Symfony 5.4
Expand All @@ -15,22 +15,11 @@ interface UserInterface extends SymfonyUserInterface
// Symfony 6
} else {
/**
* @link https://github.com/symfony/symfony/blob/6.0/src/Symfony/Component/Security/Core/User/LegacyPasswordAuthenticatedUserInterface.php
* @link https://github.com/symfony/symfony/blob/6.0/src/Symfony/Component/Security/Core/User/UserInterface.php
* @link https://github.com/symfony/symfony/blob/6.0/src/Symfony/Component/Security/Core/User/PasswordAuthenticatedUserInterface.php
*/
interface UserInterface extends SymfonyUserInterface, PasswordAuthenticatedUserInterface
interface UserInterface extends LegacyPasswordAuthenticatedUserInterface, SymfonyUserInterface
{
/**
* Returns the salt that was originally used to hash the password.
*
* This can return null if the password was not hashed using a salt.
*
* This method is deprecated since Symfony 5.3, implement it from {@link LegacyPasswordAuthenticatedUserInterface} instead.
*
* @return string|null The salt
*/
public function getSalt();

/**
* @return string
*
Expand Down

0 comments on commit eeb3d83

Please sign in to comment.