Skip to content
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

[HttpKernel] Set the default locale early #29483

Merged
merged 1 commit into from Jan 2, 2019

Conversation

Projects
None yet
8 participants
@thewilkybarkid
Copy link
Contributor

commented Dec 6, 2018

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).

@thewilkybarkid thewilkybarkid changed the base branch from master to 3.4 Dec 6, 2018

@thewilkybarkid thewilkybarkid force-pushed the thewilkybarkid:early-default-locale branch from 9fdb130 to c499c47 Dec 6, 2018

@thewilkybarkid

This comment has been minimized.

Copy link
Contributor Author

commented Dec 6, 2018

Failures are unrelated.

@chalasr chalasr added this to the 3.4 milestone Dec 9, 2018

@nicolas-grekas
Copy link
Member

left a comment

makes sense to me

Show resolved Hide resolved src/Symfony/Component/HttpKernel/Tests/EventListener/LocaleListenerTest.php Outdated
// must be registered after the Router to have access to the _locale
KernelEvents::REQUEST => array(array('onKernelRequest', 16)),
KernelEvents::REQUEST => array(
array('onKernelRequestEarly', 100),

This comment has been minimized.

Copy link
@nicolas-grekas

nicolas-grekas Dec 12, 2018

Member

should we discuss the "100"? (I didn't check - just asking :) )

This comment has been minimized.

Copy link
@thewilkybarkid

thewilkybarkid Dec 13, 2018

Author Contributor

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?).

@ro0NL

ro0NL approved these changes Dec 13, 2018

Copy link
Contributor

left a comment

might deserve a changelog entry

@nicolas-grekas

This comment has been minimized.

Copy link
Member

commented Dec 13, 2018

might deserve a changelog entry

which is another hint this should go on master - same as #29186 :)

@thewilkybarkid thewilkybarkid changed the base branch from 3.4 to master Dec 13, 2018

@thewilkybarkid thewilkybarkid force-pushed the thewilkybarkid:early-default-locale branch from 096a1e6 to 02c9f35 Dec 13, 2018

@fabpot

fabpot approved these changes Jan 2, 2019

@fabpot

This comment has been minimized.

Copy link
Member

commented Jan 2, 2019

Thank you @thewilkybarkid.

@fabpot fabpot merged commit 02c9f35 into symfony:master Jan 2, 2019

2 of 3 checks passed

continuous-integration/travis-ci/pr The Travis CI build failed
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
fabbot.io Your code looks good.
Details

fabpot added a commit that referenced this pull request Jan 2, 2019

feature #29483 [HttpKernel] Set the default locale early (thewilkybar…
…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

@thewilkybarkid thewilkybarkid deleted the thewilkybarkid:early-default-locale branch Jan 2, 2019

@fabpot fabpot referenced this pull request May 9, 2019

Merged

Release v4.3.0-BETA1 #31435

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.