[HttpKernel] Set the default locale early#29483
Merged
fabpot merged 1 commit intosymfony:masterfrom Jan 2, 2019
Merged
Conversation
9fdb130 to
c499c47
Compare
Contributor
Author
|
Failures are unrelated. |
stof
requested changes
Dec 7, 2018
src/Symfony/Component/HttpKernel/EventListener/LocaleListener.php
Outdated
Show resolved
Hide resolved
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), |
Member
There was a problem hiding this comment.
should we discuss the "100"? (I didn't check - just asking :) )
Contributor
Author
There was a problem hiding this comment.
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?).
xabbuh
reviewed
Dec 13, 2018
src/Symfony/Component/HttpKernel/EventListener/LocaleListener.php
Outdated
Show resolved
Hide resolved
nicolas-grekas
approved these changes
Dec 13, 2018
ro0NL
approved these changes
Dec 13, 2018
Contributor
ro0NL
left a comment
There was a problem hiding this comment.
might deserve a changelog entry
Member
which is another hint this should go on master - same as #29186 :) |
096a1e6 to
02c9f35
Compare
fabpot
approved these changes
Jan 2, 2019
Member
|
Thank you @thewilkybarkid. |
fabpot
added a commit
that referenced
this pull request
Jan 2, 2019
…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
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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).