<?php
use App\Kernel;
use App\Listener\MaintenanceListener;
use Symfony\Component\HttpFoundation\Response;
require_once dirname(__DIR__).'/vendor/autoload_runtime.php';
return function (array $context) {
// Start disabled/maintenance check
$maintenance = (new MaintenanceListener(dirname(__DIR__)))->web();
if ($maintenance instanceof Response) {
$maintenance->send();
exit;
}
// End disabled/maintenance check
return new Kernel($context['APP_ENV'], (bool) $context['APP_DEBUG']);
};