diff --git a/src/Listener/ReloadDotenvListener.php b/src/Listener/ReloadDotenvListener.php index b9acd5c..2478c62 100644 --- a/src/Listener/ReloadDotenvListener.php +++ b/src/Listener/ReloadDotenvListener.php @@ -35,8 +35,10 @@ public function process(object $event): void $this->reloadDotenv(); } - protected function reloadDotenv(): void + private function reloadDotenv(): void { - DotenvManager::reload([BASE_PATH]); + if (file_exists(BASE_PATH . '/.env')) { + DotenvManager::reload([BASE_PATH]); + } } }