-
Notifications
You must be signed in to change notification settings - Fork 4
/
UserInterface.php
30 lines (26 loc) · 990 Bytes
/
UserInterface.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<?php
declare(strict_types=1);
namespace SyliusLabs\Polyfill\Symfony\Security\Core\User;
use Symfony\Component\Security\Core\User\LegacyPasswordAuthenticatedUserInterface;
use Symfony\Component\Security\Core\User\UserInterface as SymfonyUserInterface;
// Symfony 5.4
if (\method_exists(SymfonyUserInterface::class, 'getPassword')) {
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
*/
interface UserInterface extends LegacyPasswordAuthenticatedUserInterface, SymfonyUserInterface
{
/**
* @return string
*
* @deprecated since Symfony 5.3, use getUserIdentifier() instead
*/
public function getUsername();
}
}