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 08a42e7

Browse filesBrowse files
committed
[HttpKernel] made request stack feature BC
1 parent d3ca145 commit 08a42e7
Copy full SHA for 08a42e7

File tree

Expand file treeCollapse file tree

4 files changed

+5
-5
lines changed
Filter options
Expand file treeCollapse file tree

4 files changed

+5
-5
lines changed

‎src/Symfony/Component/HttpFoundation/RequestStack.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/HttpFoundation/RequestStack.php
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,12 @@ public function push(Request $request)
4242
* This method should generally not be called directly as the stack
4343
* management should be taken care of by the application itself.
4444
*
45-
* @return Request
45+
* @return Request|null
4646
*/
4747
public function pop()
4848
{
4949
if (!$this->requests) {
50-
throw new \LogicException('Unable to pop a Request as the stack is already empty.');
50+
return null;
5151
}
5252

5353
return array_pop($this->requests);

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

Copy file name to clipboardExpand all lines: src/Symfony/Component/HttpKernel/EventListener/LocaleListener.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ public function onKernelRequest(GetResponseEvent $event)
7878
public function onKernelFinishRequest(FinishRequestEvent $event)
7979
{
8080
if (null === $this->requestStack) {
81-
throw new \LogicException('You must pass a RequestStack.');
81+
return; // removed when requestStack is required
8282
}
8383

8484
if (null !== $parentRequest = $this->requestStack->getParentRequest()) {

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

Copy file name to clipboardExpand all lines: src/Symfony/Component/HttpKernel/EventListener/RouterListener.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ public function setRequest(Request $request = null)
9494
public function onKernelFinishRequest(FinishRequestEvent $event)
9595
{
9696
if (null === $this->requestStack) {
97-
throw new \LogicException('You must pass a RequestStack.');
97+
return; // removed when requestStack is required
9898
}
9999

100100
$this->setRequest($this->requestStack->getParentRequest());

‎src/Symfony/Component/Security/composer.json

Copy file name to clipboardExpand all lines: src/Symfony/Component/Security/composer.json
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"require": {
1919
"php": ">=5.3.3",
2020
"symfony/event-dispatcher": "~2.1",
21-
"symfony/http-foundation": "~2.4",
21+
"symfony/http-foundation": "~2.1",
2222
"symfony/http-kernel": "~2.4"
2323
},
2424
"require-dev": {

0 commit comments

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