From bf28afb65100cc2ae3bad5929d113639dc3101a0 Mon Sep 17 00:00:00 2001 From: Art4 Date: Wed, 22 Jan 2025 11:56:23 +0000 Subject: [PATCH] Remove dependency for ServerRequestInterface in App::load() --- src/App.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/App.php b/src/App.php index 776b5ea909..5ee8562dbf 100644 --- a/src/App.php +++ b/src/App.php @@ -159,7 +159,7 @@ class App $this->appHelper = $this->container->create(AppHelper::class); $this->load( - $request, + $request->getServerParams(), $this->container->create(DbaDefinition::class), $this->container->create(ViewDefinition::class), ); @@ -272,7 +272,7 @@ class App /** * Load the whole app instance */ - private function load(ServerRequestInterface $request, DbaDefinition $dbaDefinition, ViewDefinition $viewDefinition) + private function load(array $serverParams, DbaDefinition $dbaDefinition, ViewDefinition $viewDefinition) { if ($this->config->get('system', 'ini_max_execution_time') !== false) { set_time_limit((int)$this->config->get('system', 'ini_max_execution_time')); @@ -294,7 +294,7 @@ class App if ($this->mode->has(Mode::DBAVAILABLE)) { Core\Hook::loadHooks(); - $loader = (new Config())->createConfigFileManager($this->appHelper->getBasePath(), $request->getServerParams()); + $loader = (new Config())->createConfigFileManager($this->appHelper->getBasePath(), $serverParams); Core\Hook::callAll('load_config', $loader); // Hooks are now working, reload the whole definitions with hook enabled