diff --git a/Controller/Controller.php b/Controller/Controller.php index 22f8305..f5265f6 100644 --- a/Controller/Controller.php +++ b/Controller/Controller.php @@ -21,6 +21,7 @@ use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpFoundation\Session\Flash\AutoExpireFlashBag; use Symfony\Component\HttpKernel\Exception\HttpException; +use Symfony\Component\Routing\RouteCollection; /** * Controller class. @@ -63,7 +64,7 @@ public function indexAction(Request $request, $_format): Response $serializedRoutes = file_get_contents($path); $exposedRoutes = $this->serializer->deserialize( $serializedRoutes, - 'Symfony\Component\Routing\RouteCollection', + RouteCollection::class, 'json' ); } @@ -83,7 +84,7 @@ public function indexAction(Request $request, $_format): Response if (null !== $callback = $request->query->get('callback')) { $validator = new \JsonpCallbackValidator(); - if (!$validator->validate($callback)) { + if (!$validator::validate($callback)) { throw new HttpException(400, 'Invalid JSONP callback value'); }