Skip to content

Commit

Permalink
[HttpKernel] made request stack feature BC
Browse files Browse the repository at this point in the history
  • Loading branch information
Tobion committed Sep 17, 2013
1 parent d3ca145 commit 08a42e7
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/Symfony/Component/HttpFoundation/RequestStack.php
Expand Up @@ -42,12 +42,12 @@ public function push(Request $request)
* This method should generally not be called directly as the stack
* management should be taken care of by the application itself.
*
* @return Request
* @return Request|null
*/
public function pop()
{
if (!$this->requests) {
throw new \LogicException('Unable to pop a Request as the stack is already empty.');
return null;
}

return array_pop($this->requests);
Expand Down
Expand Up @@ -78,7 +78,7 @@ public function onKernelRequest(GetResponseEvent $event)
public function onKernelFinishRequest(FinishRequestEvent $event)
{
if (null === $this->requestStack) {
throw new \LogicException('You must pass a RequestStack.');
return; // removed when requestStack is required
}

if (null !== $parentRequest = $this->requestStack->getParentRequest()) {
Expand Down
Expand Up @@ -94,7 +94,7 @@ public function setRequest(Request $request = null)
public function onKernelFinishRequest(FinishRequestEvent $event)
{
if (null === $this->requestStack) {
throw new \LogicException('You must pass a RequestStack.');
return; // removed when requestStack is required
}

$this->setRequest($this->requestStack->getParentRequest());
Expand Down
2 changes: 1 addition & 1 deletion src/Symfony/Component/Security/composer.json
Expand Up @@ -18,7 +18,7 @@
"require": {
"php": ">=5.3.3",
"symfony/event-dispatcher": "~2.1",
"symfony/http-foundation": "~2.4",
"symfony/http-foundation": "~2.1",
"symfony/http-kernel": "~2.4"
},
"require-dev": {
Expand Down

0 comments on commit 08a42e7

Please sign in to comment.