Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit c23455e

Browse filesBrowse files
committed
[Security] Readd deprecated methods to the interfaces
1 parent 45e1b1e commit c23455e
Copy full SHA for c23455e

File tree

6 files changed

+29
-0
lines changed
Filter options

6 files changed

+29
-0
lines changed

‎src/Symfony/Bridge/Doctrine/Security/User/UserLoaderInterface.php

Copy file name to clipboardExpand all lines: src/Symfony/Bridge/Doctrine/Security/User/UserLoaderInterface.php
+4Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,8 @@
2929
*/
3030
interface UserLoaderInterface
3131
{
32+
/**
33+
* @deprecated since Symfony 5.3, use loadUserByIdentifier() instead
34+
*/
35+
public function loadUserByUsername(string $username);
3236
}

‎src/Symfony/Component/Security/Core/Authentication/RememberMe/PersistentTokenInterface.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Security/Core/Authentication/RememberMe/PersistentTokenInterface.php
+5Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,4 +48,9 @@ public function getTokenValue();
4848
* @return \DateTime
4949
*/
5050
public function getLastUsed();
51+
52+
/**
53+
* @deprecated since Symfony 5.3, use getUserIdentifier() instead
54+
*/
55+
public function getUsername();
5156
}

‎src/Symfony/Component/Security/Core/Authentication/Token/TokenInterface.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Security/Core/Authentication/Token/TokenInterface.php
+5Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,4 +130,9 @@ public function __serialize(): array;
130130
* Restores the object state from an array given by __serialize().
131131
*/
132132
public function __unserialize(array $data): void;
133+
134+
/**
135+
* @deprecated since Symfony 5.3, use getUserIdentifier() instead
136+
*/
137+
public function getUsername();
133138
}

‎src/Symfony/Component/Security/Core/User/UserInterface.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Security/Core/User/UserInterface.php
+5Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,4 +78,9 @@ public function getSalt();
7878
* the plain-text password is stored on this object.
7979
*/
8080
public function eraseCredentials();
81+
82+
/**
83+
* @deprecated since Symfony 5.3, use getUserIdentifier() instead
84+
*/
85+
public function getUsername();
8186
}

‎src/Symfony/Component/Security/Core/User/UserProviderInterface.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Security/Core/User/UserProviderInterface.php
+5Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,4 +57,9 @@ public function refreshUser(UserInterface $user);
5757
* @return bool
5858
*/
5959
public function supportsClass(string $class);
60+
61+
/**
62+
* @deprecated since Symfony 5.3, use loadUserByIdentifier() instead
63+
*/
64+
public function loadUserByUsername(string $username);
6065
}

‎src/Symfony/Component/Security/Http/Tests/LoginLink/LoginLinkHandlerTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Security/Http/Tests/LoginLink/LoginLinkHandlerTest.php
+5Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,11 @@ public function createUser(TestLoginLinkHandlerUser $user): void
211211
$this->users[$user->getUserIdentifier()] = $user;
212212
}
213213

214+
public function loadUserByUsername($username): TestLoginLinkHandlerUser
215+
{
216+
return $this->loadUserByIdentifier($username);
217+
}
218+
214219
public function loadUserByIdentifier(string $userIdentifier): TestLoginLinkHandlerUser
215220
{
216221
if (!isset($this->users[$userIdentifier])) {

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.