Skip to content

Commit eeb3d83

Browse files
authored
bug #8 Fix missing LegacyPasswordAuthenticatedUserInterface (coldic3)
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
2 parents ed488dd + 6d82669 commit eeb3d83

File tree

1 file changed

+3
-14
lines changed

1 file changed

+3
-14
lines changed

src/Core/User/UserInterface.php

+3-14
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

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

7-
use Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface;
7+
use Symfony\Component\Security\Core\User\LegacyPasswordAuthenticatedUserInterface;
88
use Symfony\Component\Security\Core\User\UserInterface as SymfonyUserInterface;
99

1010
// Symfony 5.4
@@ -15,22 +15,11 @@ interface UserInterface extends SymfonyUserInterface
1515
// Symfony 6
1616
} else {
1717
/**
18+
* @link https://github.com/symfony/symfony/blob/6.0/src/Symfony/Component/Security/Core/User/LegacyPasswordAuthenticatedUserInterface.php
1819
* @link https://github.com/symfony/symfony/blob/6.0/src/Symfony/Component/Security/Core/User/UserInterface.php
19-
* @link https://github.com/symfony/symfony/blob/6.0/src/Symfony/Component/Security/Core/User/PasswordAuthenticatedUserInterface.php
2020
*/
21-
interface UserInterface extends SymfonyUserInterface, PasswordAuthenticatedUserInterface
21+
interface UserInterface extends LegacyPasswordAuthenticatedUserInterface, SymfonyUserInterface
2222
{
23-
/**
24-
* Returns the salt that was originally used to hash the password.
25-
*
26-
* This can return null if the password was not hashed using a salt.
27-
*
28-
* This method is deprecated since Symfony 5.3, implement it from {@link LegacyPasswordAuthenticatedUserInterface} instead.
29-
*
30-
* @return string|null The salt
31-
*/
32-
public function getSalt();
33-
3423
/**
3524
* @return string
3625
*

0 commit comments

Comments
 (0)