chore(symfony) #57 : bump symfony to version 6.4 and fix deprecations
Some checks are pending
Cadoles/hydra-sql/pipeline/pr-develop Build started...

This commit is contained in:
2025-07-08 17:09:44 +02:00
parent 746ca35b69
commit 2e5e1e72ae
17 changed files with 1127 additions and 1347 deletions

View File

@ -11,21 +11,17 @@ use Symfony\Component\ExpressionLanguage\ExpressionLanguage;
use Symfony\Component\Finder\Exception\AccessDeniedException;
use Symfony\Component\HttpFoundation\RedirectResponse;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\RequestStack;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpFoundation\Session\SessionInterface;
use Symfony\Component\Routing\Annotation\Route;
class MainController extends AbstractController
{
private HydraService $hydra;
private Client $client;
private SessionInterface $session;
public function __construct(SessionInterface $session, HydraService $hydra, Client $client)
{
$this->session = $session;
$this->client = $client;
$this->hydra = $hydra;
public function __construct(
private readonly RequestStack $requestStack,
private readonly HydraService $hydra,
private readonly Client $client
){
}
#[Route('/', name: 'app_home')]
@ -38,9 +34,9 @@ class MainController extends AbstractController
* Route de Healthcheck (notament pour kubernetes)
*/
#[Route('/health', name: 'health')]
public function health(Request $request): Response
public function health(): Response
{
return new Response('healthy', 200);
return new Response('healthy', Response::HTTP_OK);
}
#[Route('/connect/login-accept', name: 'app_login_accept', methods: ['GET'])]
@ -51,7 +47,7 @@ class MainController extends AbstractController
if (!$user instanceof User) {
throw new AccessDeniedException();
}
$challenge = $this->session->get('challenge');
$challenge = $this->requestStack->getSession()->get('challenge');
if (!$challenge) {
return new RedirectResponse($this->getParameter('issuer_url'));
}

View File

@ -39,12 +39,12 @@ class SecurityController extends AbstractController
}
return $this->render('login.html.twig', [
'loginForm' => $loginForm->createView(),
'loginForm' => $loginForm,
]);
}
#[Route('/logout', name: 'logout')]
public function logout(Request $request): void
public function logout(): void
{
}
}