Skip to content

Commit 2d1007f

Browse files
seb-jeanjrushlow
andauthored
bug #1550 [make:user] fix getPassword() return type in certain instance with PasswordAuthenticatedUserInterface
* Update UserClassBuilder.php * fix nullable return type --------- Co-authored-by: Jesse Rushlow <[email protected]>
1 parent c2bfa32 commit 2d1007f

6 files changed

+6
-6
lines changed

src/Security/UserClassBuilder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ private function addGetPassword(ClassSourceManipulator $manipulator, UserClassCo
232232
'password',
233233
'getPassword',
234234
'string',
235-
false,
235+
true,
236236
[
237237
'@see PasswordAuthenticatedUserInterface',
238238
]

tests/Security/fixtures/expected/UserEntityWithEmailAsIdentifier.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ public function setRoles(array $roles): static
8383
/**
8484
* @see PasswordAuthenticatedUserInterface
8585
*/
86-
public function getPassword(): string
86+
public function getPassword(): ?string
8787
{
8888
return $this->password;
8989
}

tests/Security/fixtures/expected/UserEntityWithPassword.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ public function setRoles(array $roles): static
7878
/**
7979
* @see PasswordAuthenticatedUserInterface
8080
*/
81-
public function getPassword(): string
81+
public function getPassword(): ?string
8282
{
8383
return $this->password;
8484
}

tests/Security/fixtures/expected/UserEntityWithUser_IdentifierAsIdentifier.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ public function setRoles(array $roles): static
7878
/**
7979
* @see PasswordAuthenticatedUserInterface
8080
*/
81-
public function getPassword(): string
81+
public function getPassword(): ?string
8282
{
8383
return $this->password;
8484
}

tests/Security/fixtures/expected/UserModelWithEmailAsIdentifier.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public function setRoles(array $roles): static
6767
/**
6868
* @see PasswordAuthenticatedUserInterface
6969
*/
70-
public function getPassword(): string
70+
public function getPassword(): ?string
7171
{
7272
return $this->password;
7373
}

tests/Security/fixtures/expected/UserModelWithPassword.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ public function setRoles(array $roles): static
6262
/**
6363
* @see PasswordAuthenticatedUserInterface
6464
*/
65-
public function getPassword(): string
65+
public function getPassword(): ?string
6666
{
6767
return $this->password;
6868
}

0 commit comments

Comments
 (0)