From e57424ec35aa8df1ffdf2faf9713c1f699f2546d Mon Sep 17 00:00:00 2001 From: Art4 Date: Wed, 22 Jan 2025 12:46:24 +0000 Subject: [PATCH] Inject profiler into App::load() via parameter --- src/App.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/App.php b/src/App.php index 41ae4fd1b7..af1147e091 100644 --- a/src/App.php +++ b/src/App.php @@ -164,6 +164,7 @@ class App $this->container->create(ViewDefinition::class), $this->mode, $this->config, + $this->profiler, ); $this->registerTemplateEngine(); @@ -278,7 +279,8 @@ class App DbaDefinition $dbaDefinition, ViewDefinition $viewDefinition, Mode $mode, - IManageConfigValues $config + IManageConfigValues $config, + Profiler $profiler ): void { if ($config->get('system', 'ini_max_execution_time') !== false) { set_time_limit((int) $config->get('system', 'ini_max_execution_time')); @@ -296,7 +298,7 @@ class App // Ensure that all "strtotime" operations do run timezone independent date_default_timezone_set('UTC'); - $this->profiler->reset(); + $profiler->reset(); if ($mode->has(Mode::DBAVAILABLE)) { Core\Hook::loadHooks();