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 b024656

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

File tree

6 files changed

+41
-0
lines changed
Filter options

6 files changed

+41
-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
+6Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,10 @@
2929
*/
3030
interface UserLoaderInterface
3131
{
32+
/**
33+
* @return UserInterface|null
34+
*
35+
* @deprecated since Symfony 5.3, use loadUserByIdentifier() instead
36+
*/
37+
public function loadUserByUsername(string $username);
3238
}

‎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
+7Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,4 +48,11 @@ public function getTokenValue();
4848
* @return \DateTime
4949
*/
5050
public function getLastUsed();
51+
52+
/**
53+
* @return string
54+
*
55+
* @deprecated since Symfony 5.3, use getUserIdentifier() instead
56+
*/
57+
public function getUsername();
5158
}

‎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
+7Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,4 +130,11 @@ 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+
* @return string
136+
*
137+
* @deprecated since Symfony 5.3, use getUserIdentifier() instead
138+
*/
139+
public function getUsername();
133140
}

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

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

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

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

‎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.