Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 2ce6a34

Browse filesBrowse files
committed
feature #29186 [HttpKernel] Increase priority of AddRequestFormatsListener (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
2 parents c7d6bda + 9bf3136 commit 2ce6a34
Copy full SHA for 2ce6a34

File tree

Expand file treeCollapse file tree

3 files changed

+7
-2
lines changed
Filter options
Expand file treeCollapse file tree

3 files changed

+7
-2
lines changed

‎src/Symfony/Component/HttpKernel/CHANGELOG.md

Copy file name to clipboardExpand all lines: src/Symfony/Component/HttpKernel/CHANGELOG.md
+5Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
CHANGELOG
22
=========
33

4+
4.3.0
5+
-----
6+
7+
* increased the priority of `Symfony\Component\HttpKernel\EventListener\AddRequestFormatsListener`
8+
49
4.2.0
510
-----
611

‎src/Symfony/Component/HttpKernel/EventListener/AddRequestFormatsListener.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/HttpKernel/EventListener/AddRequestFormatsListener.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,6 @@ public function onKernelRequest(GetResponseEvent $event)
4545
*/
4646
public static function getSubscribedEvents()
4747
{
48-
return array(KernelEvents::REQUEST => array('onKernelRequest', 1));
48+
return array(KernelEvents::REQUEST => array('onKernelRequest', 100));
4949
}
5050
}

‎src/Symfony/Component/HttpKernel/Tests/EventListener/AddRequestFormatsListenerTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/HttpKernel/Tests/EventListener/AddRequestFormatsListenerTest.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public function testIsAnEventSubscriber()
4646
public function testRegisteredEvent()
4747
{
4848
$this->assertEquals(
49-
array(KernelEvents::REQUEST => array('onKernelRequest', 1)),
49+
array(KernelEvents::REQUEST => array('onKernelRequest', 100)),
5050
AddRequestFormatsListener::getSubscribedEvents()
5151
);
5252
}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.