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

Commit 4777eed

Browse files
author
Robin Chalas
committed
feature #25131 [SecurityBundle][Security][Translation] trigger some deprecations for legacy methods (xabbuh)
This PR was merged into the 4.0-dev branch. Discussion ---------- [SecurityBundle][Security][Translation] trigger some deprecations for legacy methods | Q | A | ------------- | --- | Branch? | master | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | yes | Tests pass? | yes | Fixed tickets | | License | MIT | Doc PR | Commits ------- e3396ea trigger some deprecations for legacy methods
2 parents 639ee0f + cf36960 commit 4777eed

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
CHANGELOG
22
=========
33

4+
4.1.0
5+
-----
6+
7+
* The `ContextListener::setLogoutOnUserChange()` method is deprecated and will be removed in 5.0.
8+
49
4.0.0
510
-----
611

Http/Firewall/ContextListener.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ class ContextListener implements ListenerInterface
4545
private $trustResolver;
4646

4747
/**
48-
* @param TokenStorageInterface $tokenStorage
49-
* @param iterable|UserProviderInterface[] $userProviders
48+
* @param TokenStorageInterface $tokenStorage
49+
* @param iterable|UserProviderInterface[] $userProviders
5050
*/
5151
public function __construct(TokenStorageInterface $tokenStorage, iterable $userProviders, string $contextKey, LoggerInterface $logger = null, EventDispatcherInterface $dispatcher = null, AuthenticationTrustResolverInterface $trustResolver = null)
5252
{
@@ -66,10 +66,12 @@ public function __construct(TokenStorageInterface $tokenStorage, iterable $userP
6666
* Enables deauthentication during refreshUser when the user has changed.
6767
*
6868
* @param bool $logoutOnUserChange
69+
*
70+
* @deprecated since version 4.1, to be removed in 5.0
6971
*/
7072
public function setLogoutOnUserChange($logoutOnUserChange)
7173
{
72-
// no-op, method to be deprecated in 4.1
74+
@trigger_error(sprintf('The %s() method is deprecated since 4.1 and will be removed in 5.0.', __METHOD__), E_USER_DEPRECATED);
7375
}
7476

7577
/**

0 commit comments

Comments
 (0)