Skip to content
This repository was archived by the owner on May 31, 2024. It is now read-only.

Commit 459743a

Browse files
committed
made deprecation notices less verbose
1 parent 44d24f5 commit 459743a

File tree

6 files changed

+15
-16
lines changed

6 files changed

+15
-16
lines changed

CHANGELOG.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,11 @@ CHANGELOG
44
4.1.0
55
-----
66

7-
* The `ContextListener::setLogoutOnUserChange()` method is deprecated and will be removed in 5.0.
7+
* The `ContextListener::setLogoutOnUserChange()` method is deprecated.
88
* added `UserValueResolver`.
99
* Using the AdvancedUserInterface is now deprecated. To use the existing
1010
functionality, create a custom user-checker based on the
11-
`Symfony\Component\Security\Core\User\UserChecker`. This functionality will
12-
be removed in Symfony 5.0.
11+
`Symfony\Component\Security\Core\User\UserChecker`.
1312

1413
4.0.0
1514
-----

Core/Authentication/Token/AbstractToken.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ private function hasUserChanged(UserInterface $user)
261261
}
262262

263263
if ($this->user instanceof AdvancedUserInterface && $user instanceof AdvancedUserInterface) {
264-
@trigger_error(sprintf('Checking for the AdvancedUserInterface in %s has been deprecated in 4.1 and will be removed in 5.0. Implement the %s to check if the user has been changed,', __METHOD__, EquatableInterface::class), E_USER_DEPRECATED);
264+
@trigger_error(sprintf('Checking for the AdvancedUserInterface in %s has been deprecated in 4.1. Implement the %s to check if the user has been changed,', __METHOD__, EquatableInterface::class), E_USER_DEPRECATED);
265265
if ($this->user->isAccountNonExpired() !== $user->isAccountNonExpired()) {
266266
return true;
267267
}
@@ -278,7 +278,7 @@ private function hasUserChanged(UserInterface $user)
278278
return true;
279279
}
280280
} elseif ($this->user instanceof AdvancedUserInterface xor $user instanceof AdvancedUserInterface) {
281-
@trigger_error(sprintf('Checking for the AdvancedUserInterface in %s has been deprecated in 4.1 and will be removed in 5.0. Implement the %s to check if the user has been changed,', __METHOD__, EquatableInterface::class), E_USER_DEPRECATED);
281+
@trigger_error(sprintf('Checking for the AdvancedUserInterface in %s has been deprecated in 4.1. Implement the %s to check if the user has been changed,', __METHOD__, EquatableInterface::class), E_USER_DEPRECATED);
282282

283283
return true;
284284
}

Core/Tests/User/UserCheckerTest.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public function testCheckPostAuthPass()
3232

3333
/**
3434
* @group legacy
35-
* @expectedDeprecation Calling Symfony\Component\Security\Core\User\UserChecker::checkPostAuth with an AdvancedUserInterface is deprecated as of 4.1 and will be removed in 5.0. Create a custom user checker if you wish to keep this functionality.
35+
* @expectedDeprecation Calling Symfony\Component\Security\Core\User\UserChecker::checkPostAuth with an AdvancedUserInterface is deprecated since Symfony 4.1. Create a custom user checker if you wish to keep this functionality.
3636
*/
3737
public function testCheckPostAuthPassAdvancedUser()
3838
{
@@ -55,7 +55,7 @@ public function testCheckPostAuthCredentialsExpired()
5555

5656
/**
5757
* @group legacy
58-
* @expectedDeprecation Calling Symfony\Component\Security\Core\User\UserChecker::checkPostAuth with an AdvancedUserInterface is deprecated as of 4.1 and will be removed in 5.0. Create a custom user checker if you wish to keep this functionality.
58+
* @expectedDeprecation Calling Symfony\Component\Security\Core\User\UserChecker::checkPostAuth with an AdvancedUserInterface is deprecated since Symfony 4.1. Create a custom user checker if you wish to keep this functionality.
5959
* @expectedException \Symfony\Component\Security\Core\Exception\CredentialsExpiredException
6060
*/
6161
public function testCheckPostAuthCredentialsExpiredAdvancedUser()
@@ -70,7 +70,7 @@ public function testCheckPostAuthCredentialsExpiredAdvancedUser()
7070

7171
/**
7272
* @group legacy
73-
* @expectedDeprecation Calling Symfony\Component\Security\Core\User\UserChecker::checkPreAuth with an AdvancedUserInterface is deprecated as of 4.1 and will be removed in 5.0. Create a custom user checker if you wish to keep this functionality.
73+
* @expectedDeprecation Calling Symfony\Component\Security\Core\User\UserChecker::checkPreAuth with an AdvancedUserInterface is deprecated since Symfony 4.1. Create a custom user checker if you wish to keep this functionality.
7474
*/
7575
public function testCheckPreAuthPassAdvancedUser()
7676
{
@@ -95,7 +95,7 @@ public function testCheckPreAuthAccountLocked()
9595

9696
/**
9797
* @group legacy
98-
* @expectedDeprecation Calling Symfony\Component\Security\Core\User\UserChecker::checkPreAuth with an AdvancedUserInterface is deprecated as of 4.1 and will be removed in 5.0. Create a custom user checker if you wish to keep this functionality.
98+
* @expectedDeprecation Calling Symfony\Component\Security\Core\User\UserChecker::checkPreAuth with an AdvancedUserInterface is deprecated since Symfony 4.1. Create a custom user checker if you wish to keep this functionality.
9999
* @expectedException \Symfony\Component\Security\Core\Exception\LockedException
100100
*/
101101
public function testCheckPreAuthAccountLockedAdvancedUser()
@@ -119,7 +119,7 @@ public function testCheckPreAuthDisabled()
119119

120120
/**
121121
* @group legacy
122-
* @expectedDeprecation Calling Symfony\Component\Security\Core\User\UserChecker::checkPreAuth with an AdvancedUserInterface is deprecated as of 4.1 and will be removed in 5.0. Create a custom user checker if you wish to keep this functionality.
122+
* @expectedDeprecation Calling Symfony\Component\Security\Core\User\UserChecker::checkPreAuth with an AdvancedUserInterface is deprecated since Symfony 4.1. Create a custom user checker if you wish to keep this functionality.
123123
* @expectedException \Symfony\Component\Security\Core\Exception\DisabledException
124124
*/
125125
public function testCheckPreAuthDisabledAdvancedUser()
@@ -144,7 +144,7 @@ public function testCheckPreAuthAccountExpired()
144144

145145
/**
146146
* @group legacy
147-
* @expectedDeprecation Calling Symfony\Component\Security\Core\User\UserChecker::checkPreAuth with an AdvancedUserInterface is deprecated as of 4.1 and will be removed in 5.0. Create a custom user checker if you wish to keep this functionality.
147+
* @expectedDeprecation Calling Symfony\Component\Security\Core\User\UserChecker::checkPreAuth with an AdvancedUserInterface is deprecated since Symfony 4.1. Create a custom user checker if you wish to keep this functionality.
148148
* @expectedException \Symfony\Component\Security\Core\Exception\AccountExpiredException
149149
*/
150150
public function testCheckPreAuthAccountExpiredAdvancedUser()

Core/User/AdvancedUserInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
*
3333
* @see UserInterface
3434
* @see AccountStatusException
35-
* @deprecated since version 4.1, will be removed in 5.0.
35+
* @deprecated since version 4.1
3636
*
3737
* @author Fabien Potencier <fabien@symfony.com>
3838
*/

Core/User/UserChecker.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public function checkPreAuth(UserInterface $user)
3333
}
3434

3535
if ($user instanceof AdvancedUserInterface && !$user instanceof User) {
36-
@trigger_error(sprintf('Calling %s with an AdvancedUserInterface is deprecated as of 4.1 and will be removed in 5.0. Create a custom user checker if you wish to keep this functionality.', __METHOD__), E_USER_DEPRECATED);
36+
@trigger_error(sprintf('Calling %s with an AdvancedUserInterface is deprecated since Symfony 4.1. Create a custom user checker if you wish to keep this functionality.', __METHOD__), E_USER_DEPRECATED);
3737
}
3838

3939
if (!$user->isAccountNonLocked()) {
@@ -65,7 +65,7 @@ public function checkPostAuth(UserInterface $user)
6565
}
6666

6767
if ($user instanceof AdvancedUserInterface && !$user instanceof User) {
68-
@trigger_error(sprintf('Calling %s with an AdvancedUserInterface is deprecated as of 4.1 and will be removed in 5.0. Create a custom user checker if you wish to keep this functionality.', __METHOD__), E_USER_DEPRECATED);
68+
@trigger_error(sprintf('Calling %s with an AdvancedUserInterface is deprecated since Symfony 4.1. Create a custom user checker if you wish to keep this functionality.', __METHOD__), E_USER_DEPRECATED);
6969
}
7070

7171
if (!$user->isCredentialsNonExpired()) {

Http/Firewall/ContextListener.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,11 +67,11 @@ public function __construct(TokenStorageInterface $tokenStorage, iterable $userP
6767
*
6868
* @param bool $logoutOnUserChange
6969
*
70-
* @deprecated since Symfony 4.1, to be removed in 5.0
70+
* @deprecated since Symfony 4.1
7171
*/
7272
public function setLogoutOnUserChange($logoutOnUserChange)
7373
{
74-
@trigger_error(sprintf('The %s() method is deprecated since Symfony 4.1 and will be removed in 5.0.', __METHOD__), E_USER_DEPRECATED);
74+
@trigger_error(sprintf('The %s() method is deprecated since Symfony 4.1.', __METHOD__), E_USER_DEPRECATED);
7575
}
7676

7777
/**

0 commit comments

Comments
 (0)