Pārlūkot izejas kodu

refactor(src): 移除 loadEnv 方法

runphp 7 mēneši atpakaļ
vecāks
revīzija
267331a5fb
1 mainītis faili ar 0 papildinājumiem un 11 dzēšanām
  1. 0 11
      src/Service/CoreService.php

+ 0 - 11
src/Service/CoreService.php

@@ -36,7 +36,6 @@ class CoreService extends Service
         $this->app->make(CommandService::class)->init($this->app, function ($commands) {
             $this->commands($commands);
         });
-        $this->loadEnv();
     }
 
     public function initExtensionList(): void
@@ -75,14 +74,4 @@ class CoreService extends Service
             }
         }
     }
-
-    public function loadEnv(): void
-    {
-        $envName = (fn() => $this->envName)->bindTo($this->app, $this->app)();
-        $home = getenv('HOME');
-        $envFile = $envName ? $home . '/.env.' . $envName : $home . '/.env';
-        if (is_file($envFile)) {
-            $this->app->env->load($envFile);
-        }
-    }
 }