File tree 4 files changed +5
-5
lines changed
4 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -42,12 +42,12 @@ public function push(Request $request)
42
42
* This method should generally not be called directly as the stack
43
43
* management should be taken care of by the application itself.
44
44
*
45
- * @return Request
45
+ * @return Request|null
46
46
*/
47
47
public function pop ()
48
48
{
49
49
if (!$ this ->requests ) {
50
- throw new \ LogicException ( ' Unable to pop a Request as the stack is already empty. ' ) ;
50
+ return null ;
51
51
}
52
52
53
53
return array_pop ($ this ->requests );
Original file line number Diff line number Diff line change @@ -78,7 +78,7 @@ public function onKernelRequest(GetResponseEvent $event)
78
78
public function onKernelFinishRequest (FinishRequestEvent $ event )
79
79
{
80
80
if (null === $ this ->requestStack ) {
81
-
108FC
throw new \ LogicException ( ' You must pass a RequestStack. ' );
81
+ return ; // removed when requestStack is required
82
82
}
83
83
84
84
if (null !== $ parentRequest = $ this ->requestStack ->getParentRequest ()) {
Original file line number Diff line number Diff line change @@ -94,7 +94,7 @@ public function setRequest(Request $request = null)
94
94
public function onKernelFinishRequest (FinishRequestEvent $ event )
95
95
{
96
96
if (null === $ this ->requestStack ) {
97
- throw new \ LogicException ( ' You must pass a RequestStack. ' );
97
+ return ; // removed when requestStack is required
98
98
}
99
99
100
100
$ this ->setRequest ($ this ->requestStack ->getParentRequest ());
Original file line number Diff line number Diff line change 18
18
"require" : {
19
19
"php" : " >=5.3.3" ,
20
20
"symfony/event-dispatcher" : " ~2.1" ,
21
- "symfony/http-foundation" : " ~2.4 " ,
21
+ "symfony/http-foundation" : " ~2.1 " ,
22
22
"symfony/http-kernel" : " ~2.4"
23
23
},
24
24
"require-dev" : {
You can’t perform that action at this time.
0 commit comments