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 49c6f3e

Browse filesBrowse files
committed
Fix deprecation messages
1 parent e40e293 commit 49c6f3e
Copy full SHA for 49c6f3e
Expand file treeCollapse file tree

35 files changed

+51
-51
lines changed

‎src/Symfony/Bridge/Doctrine/Security/RememberMe/DoctrineTokenProvider.php

Copy file name to clipboardExpand all lines: src/Symfony/Bridge/Doctrine/Security/RememberMe/DoctrineTokenProvider.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ public function createNewToken(PersistentTokenInterface $token)
117117
$sql = 'INSERT INTO rememberme_token (class, username, series, value, lastUsed) VALUES (:class, :username, :series, :value, :lastUsed)';
118118
$paramValues = [
119119
'class' => $token->getClass(),
120-
// @deprecated since 5.3, change to $token->getUserIdentifier() in 6.0
120+
// @deprecated since Symfony 5.3, change to $token->getUserIdentifier() in 6.0
121121
'username' => method_exists($token, 'getUserIdentifier') ? $token->getUserIdentifier() : $token->getUsername(),
122122
'series' => $token->getSeries(),
123123
'value' => $token->getTokenValue(),

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

Copy file name to clipboardExpand all lines: src/Symfony/Bridge/Doctrine/Security/User/EntityUserProvider.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ public function loadUserByIdentifier(string $identifier): UserInterface
6666
throw new \InvalidArgumentException(sprintf('You must either make the "%s" entity Doctrine Repository ("%s") implement "Symfony\Bridge\Doctrine\Security\User\UserLoaderInterface" or set the "property" option in the corresponding entity provider configuration.', $this->classOrAlias, get_debug_type($repository)));
6767
}
6868

69-
// @deprecated since 5.3, change to $repository->loadUserByIdentifier() in 6.0
69+
// @deprecated since Symfony 5.3, change to $repository->loadUserByIdentifier() in 6.0
7070
if (method_exists($repository, 'loadUserByIdentifier')) {
7171
$user = $repository->loadUserByIdentifier($identifier);
7272
} else {

‎src/Symfony/Bridge/Monolog/Processor/AbstractTokenProcessor.php

Copy file name to clipboardExpand all lines: src/Symfony/Bridge/Monolog/Processor/AbstractTokenProcessor.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public function __invoke(array $record): array
4646
'roles' => $token->getRoleNames(),
4747
];
4848

49-
// @deprecated since 5.3, change to $token->getUserIdentifier() in 6.0
49+
// @deprecated since Symfony 5.3, change to $token->getUserIdentifier() in 6.0
5050
if (method_exists($token, 'getUserIdentifier')) {
5151
$record['extra'][$this->getKey()]['username'] = $record['extra'][$this->getKey()]['user_identifier'] = $token->getUserIdentifier();
5252
} else {

‎src/Symfony/Bundle/SecurityBundle/DataCollector/SecurityDataCollector.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/SecurityBundle/DataCollector/SecurityDataCollector.php
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ public function collect(Request $request, Response $response, \Throwable $except
100100
$impersonatorUser = null;
101101
if ($token instanceof SwitchUserToken) {
102102
$originalToken = $token->getOriginalToken();
103-
// @deprecated since 5.3, change to $originalToken->getUserIdentifier() in 6.0
103+
// @deprecated since Symfony 5.3, change to $originalToken->getUserIdentifier() in 6.0
104104
$impersonatorUser = method_exists($originalToken, 'getUserIdentifier') ? $originalToken->getUserIdentifier() : $originalToken->getUsername();
105105
}
106106

@@ -130,7 +130,7 @@ public function collect(Request $request, Response $response, \Throwable $except
130130
'token' => $token,
131131
'token_class' => $this->hasVarDumper ? new ClassStub(\get_class($token)) : \get_class($token),
132132
'logout_url' => $logoutUrl,
133-
// @deprecated since 5.3, change to $token->getUserIdentifier() in 6.0
133+
// @deprecated since Symfony 5.3, change to $token->getUserIdentifier() in 6.0
134134
'user' => method_exists($token, 'getUserIdentifier') ? $token->getUserIdentifier() : $token->getUsername(),
135135
'roles' => $assignedRoles,
136136
'inherited_roles' => array_unique($inheritedRoles),

‎src/Symfony/Component/Console/Helper/Helper.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Console/Helper/Helper.php
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public function getHelperSet()
4242
/**
4343
* Returns the length of a string, using mb_strwidth if it is available.
4444
*
45-
* @deprecated since 5.3
45+
* @deprecated since Symfony 5.3
4646
*
4747
* @return int The length of the string
4848
*/
@@ -154,7 +154,7 @@ public static function formatMemory(int $memory)
154154
}
155155

156156
/**
157-
* @deprecated since 5.3
157+
* @deprecated since Symfony 5.3
158158
*/
159159
public static function strlenWithoutDecoration(OutputFormatterInterface $formatter, ?string $string)
160160
{

‎src/Symfony/Component/Ldap/Security/CheckLdapCredentialsListener.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Ldap/Security/CheckLdapCredentialsListener.php
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ public function onCheckPassport(CheckPassportEvent $event)
8383
} else {
8484
throw new LogicException('Using the "query_string" config without using a "search_dn" and a "search_password" is not supported.');
8585
}
86-
// @deprecated since 5.3, change to $user->getUserIdentifier() in 6.0
86+
// @deprecated since Symfony 5.3, change to $user->getUserIdentifier() in 6.0
8787
$username = $ldap->escape(method_exists($user, 'getUserIdentifier') ? $user->getUserIdentifier() : $user->getUsername(), '', LdapInterface::ESCAPE_FILTER);
8888
$query = str_replace('{username}', $username, $ldapBadge->getQueryString());
8989
$result = $ldap->query($ldapBadge->getDnString(), $query)->execute();
@@ -93,7 +93,7 @@ public function onCheckPassport(CheckPassportEvent $event)
9393

9494
$dn = $result[0]->getDn();
9595
} else {
96-
// @deprecated since 5.3, change to $user->getUserIdentifier() in 6.0
96+
// @deprecated since Symfony 5.3, change to $user->getUserIdentifier() in 6.0
9797
$username = $ldap->escape(method_exists($user, 'getUserIdentifier') ? $user->getUserIdentifier() : $user->getUsername(), '', LdapInterface::ESCAPE_DN);
9898
$dn = str_replace('{username}', $username, $ldapBadge->getDnString());
9999
}

‎src/Symfony/Component/Security/Core/Authentication/AuthenticationProviderManager.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Security/Core/Authentication/AuthenticationProviderManager.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ public function authenticate(TokenInterface $token)
110110
$this->eventDispatcher->dispatch(new AuthenticationSuccessEvent($result), AuthenticationEvents::AUTHENTICATION_SUCCESS);
111111
}
112112

113-
// @deprecated since 5.3
113+
// @deprecated since Symfony 5.3
114114
if ($user = $result->getUser() instanceof UserInterface && !method_exists($result->getUser(), 'getUserIdentifier')) {
115115
trigger_deprecation('symfony/security-core', '5.3', 'Not implementing method "getUserIdentifier(): string" in user class "%s" is deprecated. This method will replace "getUsername()" in Symfony 6.0.', get_debug_type($result->getUser()));
116116
}

‎src/Symfony/Component/Security/Core/Authentication/Provider/DaoAuthenticationProvider.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Security/Core/Authentication/Provider/DaoAuthenticationProvider.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ protected function retrieveUser(string $userIdentifier, UsernamePasswordToken $t
120120
}
121121

122122
try {
123-
// @deprecated since 5.3, change to $this->userProvider->loadUserByIdentifier() in 6.0
123+
// @deprecated since Symfony 5.3, change to $this->userProvider->loadUserByIdentifier() in 6.0
124124
if (method_exists($this->userProvider, 'loadUserByIdentifier')) {
125125
$user = $this->userProvider->loadUserByIdentifier($userIdentifier);
126126
} else {

‎src/Symfony/Component/Security/Core/Authentication/Provider/LdapBindAuthenticationProvider.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Security/Core/Authentication/Provider/LdapBindAuthenticationProvider.php
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ protected function retrieveUser(string $userIdentifier, UsernamePasswordToken $t
7070
throw new UserNotFoundException('User identifier can not be null.');
7171
}
7272

73-
// @deprecated since 5.3, change to $this->userProvider->loadUserByIdentifier() in 6.0
73+
// @deprecated since Symfony 5.3, change to $this->userProvider->loadUserByIdentifier() in 6.0
7474
if (method_exists($this->userProvider, 'loadUserByIdentifier')) {
7575
return $this->userProvider->loadUserByIdentifier($userIdentifier);
7676
} else {
@@ -85,7 +85,7 @@ protected function retrieveUser(string $userIdentifier, UsernamePasswordToken $t
8585
*/
8686
protected function checkAuthentication(UserInterface $user, UsernamePasswordToken $token)
8787
{
88-
// @deprecated since 5.3, change to $token->getUserIdentifier() in 6.0
88+
// @deprecated since Symfony 5.3, change to $token->getUserIdentifier() in 6.0
8989
$userIdentifier = method_exists($token, 'getUserIdentifier') ? $token->getUserIdentifier() : $token->getUsername();
9090
$password = $token->getCredentials();
9191

‎src/Symfony/Component/Security/Core/Authentication/Provider/PreAuthenticatedAuthenticationProvider.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Security/Core/Authentication/Provider/PreAuthenticatedAuthenticationProvider.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ public function authenticate(TokenInterface $token)
5959
}
6060

6161
$userIdentifier = method_exists($token, 'getUserIdentifier') ? $token->getUserIdentifier() : $token->getUsername();
62-
// @deprecated since 5.3, change to $this->userProvider->loadUserByIdentifier() in 6.0
62+
// @deprecated since Symfony 5.3, change to $this->userProvider->loadUserByIdentifier() in 6.0
6363
if (method_exists($this->userProvider, 'loadUserByIdentifier')) {
6464
$user = $this->userProvider->loadUserByIdentifier($userIdentifier);
6565
} else {

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

Copy file name to clipboardExpand all lines: src/Symfony/Component/Security/Core/Authentication/Token/AbstractToken.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ public function getUserIdentifier(): string
7575
}
7676

7777
if ($this->user instanceof UserInterface) {
78-
// @deprecated since 5.3, change to $user->getUserIdentifier() in 6.0
78+
// @deprecated since Symfony 5.3, change to $user->getUserIdentifier() in 6.0
7979
return method_exists($this->user, 'getUserIdentifier') ? $this->user->getUserIdentifier() : $this->user->getUsername();
8080
}
8181

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

Copy file name to clipboardExpand all lines: src/Symfony/Component/Security/Core/Authentication/Token/PreAuthenticatedToken.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public function __construct($user, $credentials, string $firewallName, array $ro
5050
*
5151
* @return string The provider key
5252
*
53-
* @deprecated since 5.2, use getFirewallName() instead
53+
* @deprecated since Symfony 5.2, use getFirewallName() instead
5454
*/
5555
public function getProviderKey()
5656
{

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

Copy file name to clipboardExpand all lines: src/Symfony/Component/Security/Core/Authentication/Token/RememberMeToken.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ public function setAuthenticated(bool $authenticated)
6464
*
6565
* @return string The provider secret
6666
*
67-
* @deprecated since 5.2, use getFirewallName() instead
67+
* @deprecated since Symfony 5.2, use getFirewallName() instead
6868
*/
6969
public function getProviderKey()
7070
{

‎src/Symfony/Component/Security/Core/Authentication/Token/Storage/TokenStorage.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Security/Core/Authentication/Token/Storage/TokenStorage.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public function setToken(TokenInterface $token = null)
4949
// ensure any initializer is called
5050
$this->getToken();
5151

52-
// @deprecated since 5.3
52+
// @deprecated since Symfony 5.3
5353
if (!method_exists($token, 'getUserIdentifier')) {
5454
trigger_deprecation('symfony/security-core', '5.3', 'Not implementing method "getUserIdentifier(): string" in token class "%s" is deprecated. This method will replace "getUsername()" in Symfony 6.0.', get_debug_type($token));
5555
}

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

Copy file name to clipboardExpand all lines: src/Symfony/Component/Security/Core/Authentication/Token/UsernamePasswordToken.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ public function getCredentials()
7070
*
7171
* @return string The provider key
7272
*
73-
* @deprecated since 5.2, use getFirewallName() instead
73+
* @deprecated since Symfony 5.2, use getFirewallName() instead
7474
*/
7575
public function getProviderKey()
7676
{

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

Copy file name to clipboardExpand all lines: src/Symfony/Component/Security/Core/User/ChainUserProvider.php
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public function loadUserByIdentifier(string $userIdentifier): UserInterface
6060
{
6161
foreach ($this->providers as $provider) {
6262
try {
63-
// @deprecated since 5.3, change to $provider->loadUserByIdentifier() in 6.0
63+
// @deprecated since Symfony 5.3, change to $provider->loadUserByIdentifier() in 6.0
6464
if (!method_exists($provider, 'loadUserByIdentifier')) {
6565
trigger_deprecation('symfony/security-core', '5.3', 'Not implementing method "loadUserByIdentifier()" in user provider "%s" is deprecated. This method will replace "loadUserByUsername()" in Symfony 6.0.', get_debug_type($provider));
6666

@@ -101,7 +101,7 @@ public function refreshUser(UserInterface $user)
101101
}
102102

103103
if ($supportedUserFound) {
104-
// @deprecated since 5.3, change to $user->getUserIdentifier() in 6.0
104+
// @deprecated since Symfony 5.3, change to $user->getUserIdentifier() in 6.0
105105
$username = method_exists($user, 'getUserIdentifier') ? $user->getUserIdentifier() : $user->getUsername();
106106
$e = new UserNotFoundException(sprintf('There is no user with name "%s".', $username));
107107
$e->setUserIdentifier($username);

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

Copy file name to clipboardExpand all lines: src/Symfony/Component/Security/Core/User/InMemoryUserProvider.php
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public function __construct(array $users = [])
5151
*/
5252
public function createUser(UserInterface $user)
5353
{
54-
// @deprecated since 5.3, change to $user->getUserIdentifier() in 6.0
54+
// @deprecated since Symfony 5.3, change to $user->getUserIdentifier() in 6.0
5555
$userIdentifier = strtolower(method_exists($user, 'getUserIdentifier') ? $user->getUserIdentifier() : $user->getUsername());
5656
if (isset($this->users[$userIdentifier])) {
5757
throw new \LogicException('Another user with the same username already exists.');
@@ -74,7 +74,7 @@ public function loadUserByIdentifier(string $identifier): UserInterface
7474
{
7575
$user = $this->getUser($identifier);
7676

77-
// @deprecated since 5.3, change to $user->getUserIdentifier() in 6.0
77+
// @deprecated since Symfony 5.3, change to $user->getUserIdentifier() in 6.0
7878
return new InMemoryUser(method_exists($user, 'getUserIdentifier') ? $user->getUserIdentifier() : $user->getUsername(), $user->getPassword(), $user->getRoles(), $user->isEnabled());
7979
}
8080

@@ -87,7 +87,7 @@ public function refreshUser(UserInterface $user)
8787
throw new UnsupportedUserException(sprintf('Instances of "%s" are not supported.', get_debug_type($user)));
8888
}
8989

90-
// @deprecated since 5.3, change to $user->getUserIdentifier() in 6.0
90+
// @deprecated since Symfony 5.3, change to $user->getUserIdentifier() in 6.0
9191
$storedUser = $this->getUser(method_exists($user, 'getUserIdentifier') ? $user->getUserIdentifier() : $user->getUsername());
9292
$userIdentifier = method_exists($storedUser, 'getUserIdentifier') ? $storedUser->getUserIdentifier() : $storedUser->getUsername();
9393

‎src/Symfony/Component/Security/Guard/Provider/GuardAuthenticationProvider.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Security/Guard/Provider/GuardAuthenticationProvider.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ private function authenticateViaGuard(AuthenticatorInterface $guardAuthenticator
117117

118118
if (null === $user) {
119119
$e = new UserNotFoundException(sprintf('Null returned from "%s::getUser()".', get_debug_type($guardAuthenticator)));
120-
// @deprecated since 5.3, change to $token->getUserIdentifier() in 6.0
120+
// @deprecated since Symfony 5.3, change to $token->getUserIdentifier() in 6.0
121121
$e->setUserIdentifier(method_exists($token, 'getUserIdentifier') ? $token->getUserIdentifier() : $token->getUsername());
122122

123123
throw $e;

‎src/Symfony/Component/Security/Http/Authentication/AuthenticatorManager.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Security/Http/Authentication/AuthenticatorManager.php
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ public function __construct(iterable $authenticators, TokenStorageInterface $tok
7575
public function authenticateUser(UserInterface $user, AuthenticatorInterface $authenticator, Request $request, array $badges = []): ?Response
7676
{
7777
// create an authenticated token for the User
78-
// @deprecated since 5.3, change to $user->getUserIdentifier() in 6.0
78+
// @deprecated since Symfony 5.3, change to $user->getUserIdentifier() in 6.0
7979
$token = $authenticator->createAuthenticatedToken($passport = new SelfValidatingPassport(new UserBadge(method_exists($user, 'getUserIdentifier') ? $user->getUserIdentifier() : $user->getUsername(), function () use ($user) { return $user; }), $badges), $this->firewallName);
8080

8181
// announce the authenticated token
@@ -229,7 +229,7 @@ private function executeAuthenticator(AuthenticatorInterface $authenticator, Req
229229

230230
private function handleAuthenticationSuccess(TokenInterface $authenticatedToken, PassportInterface $passport, Request $request, AuthenticatorInterface $authenticator): ?Response
231231
{
232-
// @deprecated since 5.3
232+
// @deprecated since Symfony 5.3
233233
$user = $authenticatedToken->getUser();
234234
if ($user instanceof UserInterface && !method_exists($user, 'getUserIdentifier')) {
235235
trigger_deprecation('symfony/security-core', '5.3', 'Not implementing method "getUserIdentifier(): string" in user class "%s" is deprecated. This method will replace "getUsername()" in Symfony 6.0.', get_debug_type($authenticatedToken->getUser()));

‎src/Symfony/Component/Security/Http/Authentication/DefaultAuthenticationSuccessHandler.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Security/Http/Authentication/DefaultAuthenticationSuccessHandler.php
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class DefaultAuthenticationSuccessHandler implements AuthenticationSuccessHandle
3030

3131
protected $httpUtils;
3232
protected $options;
33-
/** @deprecated since 5.2, use $firewallName instead */
33+
/** @deprecated since Symfony 5.2, use $firewallName instead */
3434
protected $providerKey;
3535
protected $firewallName;
3636
protected $defaultOptions = [
@@ -78,7 +78,7 @@ public function setOptions(array $options)
7878
*
7979
* @return string
8080
*
81-
* @deprecated since 5.2, use getFirewallName() instead
81+
* @deprecated since Symfony 5.2, use getFirewallName() instead
8282
*/
8383
public function getProviderKey()
8484
{

‎src/Symfony/Component/Security/Http/Authenticator/AbstractPreAuthenticatedAuthenticator.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Security/Http/Authenticator/AbstractPreAuthenticatedAuthenticator.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ public function supports(Request $request): ?bool
8686

8787
public function authenticate(Request $request): PassportInterface
8888
{
89-
// @deprecated since 5.3, change to $this->userProvider->loadUserByIdentifier() in 6.0
89+
// @deprecated since Symfony 5.3, change to $this->userProvider->loadUserByIdentifier() in 6.0
9090
$method = 'loadUserByIdentifier';
9191
if (!method_exists($this->userProvider, 'loadUserByIdentifier')) {
9292
trigger_deprecation('symfony/security-core', '5.3', 'Not implementing method "loadUserByIdentifier()" in user provider "%s" is deprecated. This method will replace "loadUserByUsername()" in Symfony 6.0.', get_debug_type($this->userProvider));

‎src/Symfony/Component/Security/Http/Authenticator/FormLoginAuthenticator.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Security/Http/Authenticator/FormLoginAuthenticator.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ public function authenticate(Request $request): PassportInterface
8181
{
8282
$credentials = $this->getCredentials($request);
8383

84-
// @deprecated since 5.3, change to $this->userProvider->loadUserByIdentifier() in 6.0
84+
// @deprecated since Symfony 5.3, change to $this->userProvider->loadUserByIdentifier() in 6.0
8585
$method = 'loadUserByIdentifier';
8686
if (!method_exists($this->userProvider, 'loadUserByIdentifier')) {
8787
trigger_deprecation('symfony/security-core', '5.3', 'Not implementing method "loadUserByIdentifier()" in user provider "%s" is deprecated. This method will replace "loadUserByUsername()" in Symfony 6.0.', get_debug_type($this->userProvider));

‎src/Symfony/Component/Security/Http/Authenticator/HttpBasicAuthenticator.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Security/Http/Authenticator/HttpBasicAuthenticator.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ public function authenticate(Request $request): PassportInterface
6464
$username = $request->headers->get('PHP_AUTH_USER');
6565
$password = $request->headers->get('PHP_AUTH_PW', '');
6666

67-
// @deprecated since 5.3, change to $this->userProvider->loadUserByIdentifier() in 6.0
67+
// @deprecated since Symfony 5.3, change to $this->userProvider->loadUserByIdentifier() in 6.0
6868
$method = 'loadUserByIdentifier';
6969
if (!method_exists($this->userProvider, 'loadUserByIdentifier')) {
7070
trigger_deprecation('symfony/security-core', '5.3', 'Not implementing method "loadUserByIdentifier()" in user provider "%s" is deprecated. This method will replace "loadUserByUsername()" in Symfony 6.0.', get_debug_type($this->userProvider));

‎src/Symfony/Component/Security/Http/Authenticator/JsonLoginAuthenticator.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Security/Http/Authenticator/JsonLoginAuthenticator.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ public function authenticate(Request $request): PassportInterface
9191
throw $e;
9292
}
9393

94-
// @deprecated since 5.3, change to $this->userProvider->loadUserByIdentifier() in 6.0
94+
// @deprecated since Symfony 5.3, change to $this->userProvider->loadUserByIdentifier() in 6.0
9595
$method = 'loadUserByIdentifier';
9696
if (!method_exists($this->userProvider, 'loadUserByIdentifier')) {
9797
trigger_deprecation('symfony/security-core', '5.3', 'Not implementing method "loadUserByIdentifier()" in user provider "%s" is deprecated. This method will replace "loadUserByUsername()" in Symfony 6.0.', get_debug_type($this->userProvider));

‎src/Symfony/Component/Security/Http/EventListener/UserProviderListener.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Security/Http/EventListener/UserProviderListener.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public function checkPassport(CheckPassportEvent $event): void
4545
return;
4646
}
4747

48-
// @deprecated since 5.3, change to $this->userProvider->loadUserByIdentifier() in 6.0
48+
// @deprecated since Symfony 5.3, change to $this->userProvider->loadUserByIdentifier() in 6.0
4949
if (method_exists($this->userProvider, 'loadUserByIdentifier')) {
5050
$badge->setUserLoader([$this->userProvider, 'loadUserByIdentifier']);
5151
} else {

‎src/Symfony/Component/Security/Http/Firewall/AbstractAuthenticationListener.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Security/Http/Firewall/AbstractAuthenticationListener.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ private function onFailure(Request $request, AuthenticationException $failed): R
199199
private function onSuccess(Request $request, TokenInterface $token): Response
200200
{
201201
if (null !== $this->logger) {
202-
// @deprecated since 5.3, change to $token->getUserIdentifier() in 6.0
202+
// @deprecated since Symfony 5.3, change to $token->getUserIdentifier() in 6.0
203203
$this->logger->info('User has been authenticated successfully.', ['username' => method_exists($token, 'getUserIdentifier') ? $token->getUserIdentifier() : $token->getUsername()]);
204204
}
205205

0 commit comments

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