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

Commit cf36960

Browse files
committed
trigger some deprecations for legacy methods
1 parent 85c8911 commit cf36960

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
@@ -46,8 +46,8 @@ class ContextListener implements ListenerInterface
4646
private $logoutOnUserChange = true;
4747

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

7678
/**

0 commit comments

Comments
 (0)