27
27
use Symfony \Component \HttpFoundation \Response ;
28
28
use Symfony \Component \HttpFoundation \Session \SessionInterface ;
29
29
use Symfony \Component \HttpKernel \Exception \NotFoundHttpException ;
30
- use Symfony \Component \Routing \Router ;
30
+ use Symfony \Component \Routing \Generator \ UrlGeneratorInterface ;
31
31
use Symfony \Component \Security \Core \Authentication \Token \Storage \TokenStorageInterface ;
32
32
use Symfony \Component \Security \Core \Exception \AccessDeniedException ;
33
33
use Symfony \Component \Security \Core \User \UserInterface ;
@@ -85,7 +85,7 @@ class AuthorizeController implements ContainerAwareInterface
85
85
private $ tokenStorage ;
86
86
87
87
/**
88
- * @var Router
88
+ * @var UrlGeneratorInterface
89
89
*/
90
90
private $ router ;
91
91
@@ -126,7 +126,7 @@ public function setContainer(ContainerInterface $container = null)
126
126
* @param OAuth2 $oAuth2Server
127
127
* @param EngineInterface $templating
128
128
* @param TokenStorageInterface $tokenStorage
129
- * @param Router $router
129
+ * @param UrlGeneratorInterface $router
130
130
* @param ClientManagerInterface $clientManager
131
131
* @param EventDispatcher $eventDispatcher
132
132
* @param string $templateEngineType
@@ -139,7 +139,7 @@ public function __construct(
139
139
OAuth2 $ oAuth2Server ,
140
140
EngineInterface $ templating ,
141
141
TokenStorageInterface $ tokenStorage ,
142
- Router $ router ,
142
+ UrlGeneratorInterface $ router ,
143
143
ClientManagerInterface $ clientManager ,
144
144
EventDispatcher $ eventDispatcher ,
145
145
$ templateEngineType = 'twig '
@@ -259,7 +259,7 @@ protected function getClient()
259
259
260
260
if (null === $ clientId = $ request ->get ('client_id ' )) {
261
261
$ formData = $ request ->get ($ this ->authorizeForm ->getName (), []);
262
- $ clientId = $ formData ['client_id ' ] ?? null ;
262
+ $ clientId = isset ( $ formData ['client_id ' ]) ? $ formData [ ' client_id ' ] : null ;
263
263
}
264
264
265
265
$ this ->client = $ this ->clientManager ->findClientByPublicId ($ clientId );
0 commit comments