<?php
declare(strict_types=1);
namespace App\Controller;
use MobailApps\SmartPlaces\Core\Contract\CoreInterface;
use Psr\Log\LoggerInterface;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\RequestStack;
use Symfony\Component\Routing\Annotation\Route;
use Twig\Environment;
/**
* Health check controller for Kubernetes probes.
*
* This controller handles health check endpoints. All routing is managed
* by Symfony's native routing component via #[Route] attributes.
*/
class HealthController extends BaseController
{
public function __construct(
CoreInterface $core,
Environment $twig,
LoggerInterface $logger,
RequestStack $requestStack
) {
$this->core = $core;
$this->twig = $twig;
$this->logger = $logger;
$this->requestStack = $requestStack;
$this->initializeController();
}
/**
* Liveness probe endpoint for Kubernetes.
*
* Returns an empty JSON array to indicate the service is alive.
*/
#[Route('/liveness', name: 'app_liveness', methods: ['GET', 'HEAD'])]
public function liveness(): JsonResponse
{
return new JsonResponse([]);
}
}