-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[HttpKernel] Set the default locale early #29483
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
9fdb130
to
c499c47
Compare
Failures are unrelated. |
src/Symfony/Component/HttpKernel/EventListener/LocaleListener.php
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
makes sense to me
src/Symfony/Component/HttpKernel/Tests/EventListener/LocaleListenerTest.php
Outdated
Show resolved
Hide resolved
// must be registered after the Router to have access to the _locale | ||
KernelEvents::REQUEST => array(array('onKernelRequest', 16)), | ||
KernelEvents::REQUEST => array( | ||
array('onKernelRequestEarly', 100), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we discuss the "100"? (I didn't check - just asking :) )
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was matching the priority from #29186; only thing higher in core is SessionListener
(and DebugHandlersListener
). IMO these should be set as early as possible (so maybe even higher?).
src/Symfony/Component/HttpKernel/EventListener/LocaleListener.php
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
might deserve a changelog entry
which is another hint this should go on master - same as #29186 :) |
096a1e6
to
02c9f35
Compare
Thank you @thewilkybarkid. |
…kid) This PR was merged into the 4.3-dev branch. Discussion ---------- [HttpKernel] Set the default locale early | Q | A | ------------- | --- | Branch? | 3.4 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | | License | MIT | Doc PR | Similar to #29186, the default locale isn't set till after the router so isn't available when trying to handle errors there (well, only the _default_ default locale is). Commits ------- 02c9f35 Set the default locale early
Similar to #29186, the default locale isn't set till after the router so isn't available when trying to handle errors there (well, only the default default locale is).