File tree Expand file tree Collapse file tree 2 files changed +24
-2
lines changed
Expand file tree Collapse file tree 2 files changed +24
-2
lines changed Original file line number Diff line number Diff line change @@ -199,6 +199,11 @@ public function getId()
199199 return $ this ->id ;
200200 }
201201
202+ public function getUserIdentifier (): string
203+ {
204+ return $ this ->username ;
205+ }
206+
202207 /**
203208 * {@inheritdoc}
204209 */
@@ -242,7 +247,7 @@ public function getEmailCanonical()
242247 /**
243248 * {@inheritdoc}
244249 */
245- public function getPassword ()
250+ public function getPassword (): ? string
246251 {
247252 return $ this ->password ;
248253 }
Original file line number Diff line number Diff line change 1111
1212namespace FOS \UserBundle \Model ;
1313
14+ use Symfony \Component \Security \Core \User \PasswordAuthenticatedUserInterface ;
1415use Symfony \Component \Security \Core \User \UserInterface as BaseUserInterface ;
1516
17+ if (interface_exists (PasswordAuthenticatedUserInterface::class)) {
18+ /**
19+ * @internal Only for back compatibility. Remove / merge when dropping support for Symfony 4
20+ */
21+ interface CompatUserInterface extends PasswordAuthenticatedUserInterface, BaseUserInterface
22+ {
23+ }
24+ } else {
25+ /**
26+ * @internal Only for back compatibility. Remove / merge when dropping support for Symfony 4
27+ */
28+ interface CompatUserInterface extends BaseUserInterface
29+ {
30+ }
31+ }
32+
1633/**
1734 * Implementations of that interface must be serializable. The mechanism
1835 * being used to support serialization is up for the implementation.
2340 * @author Johannes M. Schmitt <schmittjoh@gmail.com>
2441 * @author Julian Finkler <julian@developer-heaven.de>
2542 */
26- interface UserInterface extends BaseUserInterface
43+ interface UserInterface extends CompatUserInterface
2744{
2845 public const ROLE_DEFAULT = 'ROLE_USER ' ;
2946
You can’t perform that action at this time.
0 commit comments