Skip to content

Commit 355681e

Browse files
committed
minor #7602 Update locale_sticky_session.rst (atailouloute)
This PR was merged into the 2.7 branch. Discussion ---------- Update locale_sticky_session.rst - Add missing parenthesis - Fix `addArgument` parameter, it should be a `Reference` object instead of a string Commits ------- 2a6ec87 Update locale_sticky_session.rst
2 parents 46f9587 + 2a6ec87 commit 355681e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

session/locale_sticky_session.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,13 +202,14 @@ Then register the listener:
202202
203203
// app/config/services.php
204204
use AppBundle\EventListener\UserLocaleListener;
205+
use Symfony\Component\DependencyInjection\Reference;
205206
206207
$container
207208
->register('app.user_locale_listener', UserLocaleListener::class)
208-
->addArgument('session')
209+
->addArgument(new Reference('session'))
209210
->addTag(
210211
'kernel.event_listener',
211-
array('event' => 'security.interactive_login', 'method' => 'onInteractiveLogin'
212+
array('event' => 'security.interactive_login', 'method' => 'onInteractiveLogin')
212213
);
213214
214215
.. caution::

0 commit comments

Comments
 (0)