Skip to content

Commit 4a7f771

Browse files
author
Toshiro Kida
authored
Making DefaultController work with Symfony 2.3
Pre Symfony 2.6 (I think) `$this->redirectToRoute()` was satisfied by `$this->redirect($this->generateUrl())`. Making this edit to work with Symfony 2.3. It might be worthwhile to check version by looking at `Symfony\Component\HttpKernel\Kernel::VERSION`, as per http://stackoverflow.com/questions/16846189/how-to-know-which-version-of-symfony-i-have#16846325
1 parent 79b329c commit 4a7f771

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/LightSaml/SpBundle/Controller/DefaultController.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public function discoveryAction()
3232
$parties = $this->get('lightsaml.container.build')->getPartyContainer()->getIdpEntityDescriptorStore()->all();
3333

3434
if (count($parties) == 1) {
35-
return $this->redirectToRoute('lightsaml_sp.login', ['idp' => $parties[0]->getEntityID()]);
35+
return $this->redirect($this->generateUrl('lightsaml_sp.login', ['idp' => $parties[0]->getEntityID()]));
3636
}
3737

3838
return $this->render('LightSamlSpBundle::discovery.html.twig', [
@@ -44,7 +44,7 @@ public function loginAction(Request $request)
4444
{
4545
$idpEntityId = $request->get('idp');
4646
if (null === $idpEntityId) {
47-
return $this->redirectToRoute($this->container->getParameter('lightsaml_sp.route.discovery'));
47+
return $this->redirect($this->generateUrl($this->container->getParameter('lightsaml_sp.route.discovery')));
4848
}
4949

5050
$profile = $this->get('ligthsaml.profile.login_factory')->get($idpEntityId);

0 commit comments

Comments
 (0)