We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8829560 commit 6c4d663Copy full SHA for 6c4d663
Types/SymfonyUserInterfaceType.php
@@ -20,13 +20,14 @@ class SymfonyUserInterfaceType
20
*/
21
public function getUserName(UserInterface $user): string
22
{
23
- // @phpstan-ignore-next-line Forward Compatibility for Symfony 5.3
+ // @phpstan-ignore-next-line Forward Compatibility for Symfony >=5.3
24
if (method_exists($user, 'getUserIdentifier')) {
25
return $user->getUserIdentifier();
26
}
27
28
+ // @phpstan-ignore-next-line Backward Compatibility for Symfony <5.3
29
if (method_exists($user, 'getUserName')) {
- return $user->getUserName();
30
+ return $user->getUsername();
31
32
33
throw FieldNotFoundException::missingField(UserInterface::class, 'userName');
0 commit comments