File tree Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -117,10 +117,14 @@ private function getControllerLocator($controller)
117117 if ($ this ->container ->has ($ controller )) {
118118 // service_id
119119 $ prefix = $ controller .': ' ;
120- $ this ->container ->enterScope ('request ' );
121- $ this ->container ->set ('request ' , new Request ());
120+ if (method_exists ($ this ->container , 'enterScope ' )) {
121+ $ this ->container ->enterScope ('request ' );
122+ $ this ->container ->set ('request ' , new Request ());
123+ }
122124 $ class = get_class ($ this ->container ->get ($ controller ));
123- $ this ->container ->leaveScope ('request ' );
125+ if (method_exists ($ this ->container , 'enterScope ' )) {
126+ $ this ->container ->leaveScope ('request ' );
127+ }
124128 } elseif (class_exists ($ controller )) {
125129 // full class name
126130 $ class = $ controller ;
Original file line number Diff line number Diff line change 2222use Symfony \Component \Form \FormInterface ;
2323use Symfony \Bundle \FrameworkBundle \Templating \TemplateReference ;
2424use Symfony \Component \Routing \Generator \UrlGeneratorInterface ;
25+ use Symfony \Component \Routing \RouterInterface ;
2526use FOS \RestBundle \Util \Codes ;
2627
2728/**
@@ -240,7 +241,7 @@ public function isFormatTemplating($format)
240241 /**
241242 * Gets the router service.
242243 *
243- * @return \Symfony\Component\Routing\ RouterInterface
244+ * @return RouterInterface
244245 */
245246 protected function getRouter ()
246247 {
You can’t perform that action at this time.
0 commit comments