Skip to content

Commit dae171b

Browse files
Krzysztof Lechowskijaviereguiluz
Krzysztof Lechowski
authored andcommitted
Fixing inconcistency - subscribr to listener
There was incomplete subscriber class that looked like leftover. It has been provided with config snippet for listener. I'm guessing recommendation changed from subscriber to listener, as it makes more sense here.
1 parent 29b0fab commit dae171b

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

session/locale_sticky_session.rst

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -139,22 +139,20 @@ want to use this as the locale for the given user. To accomplish this,
139139
you can hook into the login process and update the user's session with this
140140
locale value before they are redirected to their first page.
141141

142-
To do this, you need an event subscriber on the ``security.interactive_login``
142+
To do this, you need an event listener on the ``security.interactive_login``
143143
event::
144144

145-
// src/EventSubscriber/UserLocaleSubscriber.php
145+
// src/EventSubscriber/UserLocaleListener.php
146146
namespace App\EventSubscriber;
147147

148-
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
149148
use Symfony\Component\HttpFoundation\Session\SessionInterface;
150149
use Symfony\Component\Security\Http\Event\InteractiveLoginEvent;
151-
use Symfony\Component\Security\Http\SecurityEvents;
152150

153151
/**
154152
* Stores the locale of the user in the session after the
155153
* login. This can be used by the LocaleSubscriber afterwards.
156154
*/
157-
class UserLocaleSubscriber implements EventSubscriberInterface
155+
class UserLocaleListener
158156
{
159157
private $session;
160158

0 commit comments

Comments
 (0)