Skip to content

Commit 06e6d8e

Browse files
committed
minor #10227 Fixing inconcistency - subscribr to listener (kshishkin)
This PR was submitted for the 4.1 branch but it was merged into the 4.3 branch instead (closes #10227). Discussion ---------- 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. <!-- If your pull request fixes a BUG, use the oldest maintained branch that contains the bug (see https://symfony.com/roadmap for the list of maintained branches). If your pull request documents a NEW FEATURE, use the same Symfony branch where the feature was introduced (and `master` for features of unreleased versions). --> Commits ------- dae171b Fixing inconcistency - subscribr to listener
2 parents 29b0fab + dae171b commit 06e6d8e

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)