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] Increase priority of AddRequestFormatsListener #29186

Merged

Conversation

Projects
None yet
6 participants
@thewilkybarkid
Copy link
Contributor

commented Nov 12, 2018

Q A
Branch? 2.8
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets #19469
License MIT
Doc PR

Currently AddRequestFormatsListener has a low priority, so it won't fire before others like RouterListener which can create problems (eg when listening for a HTTP exception thrown by the router you don't have access for any custom types).

IMO this map should be in the application rather than set on every request, but the same can be achieved by giving it a high priority. (Can't think of a reason for it to not be first...)

@nicolas-grekas

This comment has been minimized.

Copy link
Member

commented Nov 26, 2018

Should target 3.4 now.

@nicolas-grekas nicolas-grekas modified the milestones: 2.8, 3.4 Nov 26, 2018

@thewilkybarkid

This comment has been minimized.

Copy link
Contributor Author

commented Nov 26, 2018

Seems that a final 2.8 release is coming? (Just has another PR merged.)

@nicolas-grekas

This comment has been minimized.

Copy link
Member

commented Nov 26, 2018

Yes, but since this is going to be the final one, we shouldn't merge behavior changes that have even a slight breaking potential. So it's safer for 3.4 now.

@fabpot

This comment has been minimized.

Copy link
Member

commented Dec 10, 2018

As there is a potential BC break, this should be done in master.

@chalasr chalasr modified the milestones: 3.4, next Dec 12, 2018

@xabbuh

xabbuh approved these changes Dec 13, 2018

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

@thewilkybarkid thewilkybarkid force-pushed the thewilkybarkid:request-formats-listener-priority branch from 7e9e2c3 to 9bf3136 Dec 13, 2018

@fabpot

This comment has been minimized.

Copy link
Member

commented Jan 2, 2019

Thank you @thewilkybarkid.

@fabpot fabpot merged commit 9bf3136 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 #29186 [HttpKernel] Increase priority of AddRequestFormatsLis…
…tener (thewilkybarkid)

This PR was merged into the 4.3-dev branch.

Discussion
----------

[HttpKernel] Increase priority of AddRequestFormatsListener

| Q             | A
| ------------- | ---
| Branch?       | 2.8
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #19469
| License       | MIT
| Doc PR        |

Currently `AddRequestFormatsListener` has a low priority, so it won't fire before others like `RouterListener` which can create problems (eg when listening for a HTTP exception thrown by the router you don't have access for any custom types).

IMO this map should be in the application rather than set on every request, but the same can be achieved by giving it a high priority. (Can't think of a reason for it to not be first...)

Commits
-------

9bf3136 Increase priority of AddRequestFormatsListener

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:request-formats-listener-priority branch Jan 2, 2019

@nicolas-grekas nicolas-grekas modified the milestones: next, 4.3 Apr 30, 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.