From 4f75c5a7ebb58216a007fed5b7b7c21b74493ed6 Mon Sep 17 00:00:00 2001 From: scrummer Date: Mon, 8 Dec 2025 14:55:07 +0100 Subject: [PATCH] Refactor bootstrap functions: Remove Request object and context --- bin/console | 2 +- public/index.php | 15 ++------------- 2 files changed, 3 insertions(+), 14 deletions(-) diff --git a/bin/console b/bin/console index 450433b..de299bc 100755 --- a/bin/console +++ b/bin/console @@ -33,7 +33,7 @@ define('OPENDXP_CONSOLE', true); Bootstrap::setProjectRoot(); -return function (array $context) { +return static function () { $kernel = Bootstrap::startupCli(); return new Application($kernel); diff --git a/public/index.php b/public/index.php index 74496bd..d3eeedd 100644 --- a/public/index.php +++ b/public/index.php @@ -13,24 +13,13 @@ */ use OpenDxp\Bootstrap; -use OpenDxp\Tool; -use Symfony\Component\HttpFoundation\Request; require_once dirname(__DIR__).'/vendor/autoload_runtime.php'; Bootstrap::setProjectRoot(); -return function (Request $request, array $context) { - - // set current request as property on tool as there's no - // request stack available yet - Tool::setCurrentRequest($request); - +return static function () { Bootstrap::bootstrap(); - $kernel = Bootstrap::kernel(); - - // reset current request - will be read from request stack from now on - Tool::setCurrentRequest(null); - return $kernel; + return Bootstrap::kernel(); };