From 5c9426148206dc50bc362059d22a94cbd5e236de Mon Sep 17 00:00:00 2001 From: butschster Date: Wed, 16 Aug 2023 13:45:20 +0400 Subject: [PATCH] Simplifies loading ENV variables from dotenv. --- src/Bridge/Dotenv/src/Bootloader/DotenvBootloader.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/Bridge/Dotenv/src/Bootloader/DotenvBootloader.php b/src/Bridge/Dotenv/src/Bootloader/DotenvBootloader.php index e50290f0c..71602328c 100644 --- a/src/Bridge/Dotenv/src/Bootloader/DotenvBootloader.php +++ b/src/Bridge/Dotenv/src/Bootloader/DotenvBootloader.php @@ -5,7 +5,6 @@ namespace Spiral\DotEnv\Bootloader; use Dotenv\Dotenv; -use Spiral\Boot\AbstractKernel; use Spiral\Boot\Bootloader\Bootloader; use Spiral\Boot\DirectoriesInterface; use Spiral\Boot\EnvironmentInterface; @@ -15,10 +14,10 @@ final class DotenvBootloader extends Bootloader private bool $init = false; public function init( - AbstractKernel $kernel, - DirectoriesInterface $dirs + DirectoriesInterface $dirs, + EnvironmentInterface $env, ): void { - $kernel->running(fn (EnvironmentInterface $env) => $this->loadEnvVariables($dirs, $env)); + $this->loadEnvVariables($dirs, $env); } public function loadEnvVariables(DirectoriesInterface $dirs, EnvironmentInterface $env): void