Skip to content

Commit 4bd4868

Browse files
committed
bug #1308 [make:user] add the void return type to eraseCredentials() (jrushlow)
This PR was squashed before being merged into the 1.0-dev branch. Discussion ---------- [make:user] add the void return type to eraseCredentials() In 6.3 tests - handle: ``` Method "Symfony\Component\Security\Core\User\UserInterface::eraseCredentials()" might add "void" as a native return type declaration in the future. Do the same in implementation "App\Entity\User" now to avoid errors or add an explicit `@return` annotation to suppress this message. ``` Commits ------- 39fe9cd [make:user] add the void return type to eraseCredentials()
2 parents 39903b8 + 39fe9cd commit 4bd4868

15 files changed

+15
-15
lines changed

src/Security/UserClassBuilder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ private function addEraseCredentials(ClassSourceManipulator $manipulator): void
304304
// add eraseCredentials: always empty
305305
$builder = $manipulator->createMethodBuilder(
306306
'eraseCredentials',
307-
null,
307+
'void',
308308
false,
309309
['@see UserInterface']
310310
);

tests/Security/fixtures/expected/UserEntityWithEmailAsIdentifier.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ public function setPassword(string $password): static
9090
/**
9191
* @see UserInterface
9292
*/
93-
public function eraseCredentials()
93+
public function eraseCredentials(): void
9494
{
9595
// If you store any temporary, sensitive data on the user, clear it here
9696
// $this->plainPassword = null;

tests/Security/fixtures/expected/UserEntityWithPassword.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ public function setPassword(string $password): static
8585
/**
8686
* @see UserInterface
8787
*/
88-
public function eraseCredentials()
88+
public function eraseCredentials(): void
8989
{
9090
// If you store any temporary, sensitive data on the user, clear it here
9191
// $this->plainPassword = null;

tests/Security/fixtures/expected/UserEntityWithUser_IdentifierAsIdentifier.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ public function setPassword(string $password): static
8585
/**
8686
* @see UserInterface
8787
*/
88-
public function eraseCredentials()
88+
public function eraseCredentials(): void
8989
{
9090
// If you store any temporary, sensitive data on the user, clear it here
9191
// $this->plainPassword = null;

tests/Security/fixtures/expected/UserEntityWithoutPassword.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ public function setRoles(array $roles): static
6363
/**
6464
* @see UserInterface
6565
*/
66-
public function eraseCredentials()
66+
public function eraseCredentials(): void
6767
{
6868
// If you store any temporary, sensitive data on the user, clear it here
6969
// $this->plainPassword = null;

tests/Security/fixtures/expected/UserModelWithEmailAsIdentifier.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ public function setPassword(string $password): static
7575
/**
7676
* @see UserInterface
7777
*/
78-
public function eraseCredentials()
78+
public function eraseCredentials(): void
7979
{
8080
// If you store any temporary, sensitive data on the user, clear it here
8181
// $this->plainPassword = null;

tests/Security/fixtures/expected/UserModelWithPassword.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ public function setPassword(string $password): static
7070
/**
7171
* @see UserInterface
7272
*/
73-
public function eraseCredentials()
73+
public function eraseCredentials(): void
7474
{
7575
// If you store any temporary, sensitive data on the user, clear it here
7676
// $this->plainPassword = null;

tests/Security/fixtures/expected/UserModelWithoutPassword.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public function setRoles(array $roles): static
4949
/**
5050
* @see UserInterface
5151
*/
52-
public function eraseCredentials()
52+
public function eraseCredentials(): void
5353
{
5454
// If you store any temporary, sensitive data on the user, clear it here
5555
// $this->plainPassword = null;

tests/Security/fixtures/expected/legacy_5_user_class/UserEntityWithEmailAsIdentifier.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ public function getSalt(): ?string
109109
/**
110110
* @see UserInterface
111111
*/
112-
public function eraseCredentials()
112+
public function eraseCredentials(): void
113113
{
114114
// If you store any temporary, sensitive data on the user, clear it here
115115
// $this->plainPassword = null;

tests/Security/fixtures/expected/legacy_5_user_class/UserEntityWithPassword.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ public function getSalt(): ?string
104104
/**
105105
* @see UserInterface
106106
*/
107-
public function eraseCredentials()
107+
public function eraseCredentials(): void
108108
{
109109
// If you store any temporary, sensitive data on the user, clear it here
110110
// $this->plainPassword = null;

tests/Security/fixtures/expected/legacy_5_user_class/UserEntityWithUser_IdentifierAsIdentifier.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ public function getSalt(): ?string
104104
/**
105105
* @see UserInterface
106106
*/
107-
public function eraseCredentials()
107+
public function eraseCredentials(): void
108108
{
109109
// If you store any temporary, sensitive data on the user, clear it here
110110
// $this->plainPassword = null;

tests/Security/fixtures/expected/legacy_5_user_class/UserEntityWithoutPassword.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ public function getSalt(): ?string
9191
/**
9292
* @see UserInterface
9393
*/
94-
public function eraseCredentials()
94+
public function eraseCredentials(): void
9595
{
9696
// If you store any temporary, sensitive data on the user, clear it here
9797
// $this->plainPassword = null;

tests/Security/fixtures/expected/legacy_5_user_class/UserModelWithEmailAsIdentifier.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ public function getSalt(): ?string
9494
/**
9595
* @see UserInterface
9696
*/
97-
public function eraseCredentials()
97+
public function eraseCredentials(): void
9898
{
9999
// If you store any temporary, sensitive data on the user, clear it here
100100
// $this->plainPassword = null;

tests/Security/fixtures/expected/legacy_5_user_class/UserModelWithPassword.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ public function getSalt(): ?string
8989
/**
9090
* @see UserInterface
9191
*/
92-
public function eraseCredentials()
92+
public function eraseCredentials(): void
9393
{
9494
// If you store any temporary, sensitive data on the user, clear it here
9595
// $this->plainPassword = null;

tests/Security/fixtures/expected/legacy_5_user_class/UserModelWithoutPassword.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ public function getSalt(): ?string
7777
/**
7878
* @see UserInterface
7979
*/
80-
public function eraseCredentials()
80+
public function eraseCredentials(): void
8181
{
8282
// If you store any temporary, sensitive data on the user, clear it here
8383
// $this->plainPassword = null;

0 commit comments

Comments
 (0)