Skip to content

Commit 6c4d663

Browse files
committed
stan fix
1 parent 8829560 commit 6c4d663

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Types/SymfonyUserInterfaceType.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,14 @@ class SymfonyUserInterfaceType
2020
*/
2121
public function getUserName(UserInterface $user): string
2222
{
23-
// @phpstan-ignore-next-line Forward Compatibility for Symfony 5.3
23+
// @phpstan-ignore-next-line Forward Compatibility for Symfony >=5.3
2424
if (method_exists($user, 'getUserIdentifier')) {
2525
return $user->getUserIdentifier();
2626
}
2727

28+
// @phpstan-ignore-next-line Backward Compatibility for Symfony <5.3
2829
if (method_exists($user, 'getUserName')) {
29-
return $user->getUserName();
30+
return $user->getUsername();
3031
}
3132

3233
throw FieldNotFoundException::missingField(UserInterface::class, 'userName');

0 commit comments

Comments
 (0)