-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
Closed
Description
When upgrading from 2.5.8
to 2.6.1
the Translator
component does not seem to be compatible with the "sticky locale" from the cookbook article.
The difference with my implementation is that I use services.yml
in order to make the call, instead of implementing the EventSubscriberInterface
.
services:
acme.locale_listener:
class: Acme\DemoBundle\EventListener\LocaleListener
tags:
- { name: kernel.event_listener, event: kernel.request, method: setLocaleForUnauthenticatedUser }
Injecting the Translator
into the Listener
and setting the locale manually does solve the problem. Re-adding the code that is removed by this commit of Sept 26 also does result in the expected behaviour again.
Has the behaviour changed, or is this behaviour wanted?