8000 [HttpKernel] Set the default locale early by thewilkybarkid · Pull Request #29483 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[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

Merged
merged 1 commit into from
Jan 2, 2019

Conversation

thewilkybarkid
Copy link
Contributor
@thewilkybarkid thewilkybarkid 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
Copy link
Contributor Author

Failures are unrelated.

@chalasr chalasr added this to the 3.4 milestone Dec 9, 2018
Copy link
Member
@nicolas-grekas nicolas-grekas left a 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

// must be registered after the Router to have access to the _locale
KernelEvents::REQUEST => array(array('onKernelRequest', 16)),
KernelEvents::REQUEST => array(
array('onKernelRequestEarly', 100),
Copy link
Member

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

Copy link
Contributor Author

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

Copy link
Contributor
@ro0NL ro0NL left a 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

@nicolas-grekas
Copy link
Member

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 December 13, 2018 10:12
@fabpot
Copy link
Member
fabpot commented Jan 2, 2019

Thank you @thewilkybarkid.

@fabpot fabpot merged commit 02c9f35 into symfony:master Jan 2, 2019
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
@thewilkybarkid thewilkybarkid deleted the early-default-locale branch January 2, 2019 11:11
@fabpot fabpot mentioned this pull request May 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants
0