-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Closed
Labels
Status: Needs ReviewactionableClear and specific issues ready for anyone to take them.Clear and specific issues ready for anyone to take them.buggood first issueIdeal for your first contribution! (some Symfony experience may be required)Ideal for your first contribution! (some Symfony experience may be required)hasPRA Pull Request has already been submitted for this issue.A Pull Request has already been submitted for this issue.
Milestone
Description
https://symfony.com/doc/master/translation/locale.html
The custom listener must be called before LocaleListener, which initializes the locale based on the current request. To do so, set your listener priority to a higher value than LocaleListener priority (which you can obtain running the debug:event kernel.request command).
And then in the linked example:
https://symfony.com/doc/master/session/locale_sticky_session.html
public static function getSubscribedEvents()
{
return array(
// must be registered after the default Locale listener
KernelEvents::REQUEST => array(array('onKernelRequest', 15)),
);
}
Documentation says (in bold) the custom listener must be registered before the framework listener, the inline doc in the example says after, which is exactly the opposite.
Metadata
Metadata
Assignees
Labels
Status: Needs ReviewactionableClear and specific issues ready for anyone to take them.Clear and specific issues ready for anyone to take them.buggood first issueIdeal for your first contribution! (some Symfony experience may be required)Ideal for your first contribution! (some Symfony experience may be required)hasPRA Pull Request has already been submitted for this issue.A Pull Request has already been submitted for this issue.