diff --git a/src/Codeception/Lib/ParamsLoader.php b/src/Codeception/Lib/ParamsLoader.php
index <HASH>..<HASH> 100644
--- a/src/Codeception/Lib/ParamsLoader.php
+++ b/src/Codeception/Lib/ParamsLoader.php
@@ -116,7 +116,13 @@ class ParamsLoader
     {
         // vlucas/phpdotenv
         if (class_exists(PhpDotenv::class)) {
-            return PhpDotenv::parse(file_get_contents($this->paramsFile));
+            $repository = \Dotenv\Repository\RepositoryBuilder::createWithNoAdapters()
+                ->addAdapter(\Dotenv\Repository\Adapter\EnvConstAdapter::class)
+                ->addAdapter(\Dotenv\Repository\Adapter\ServerConstAdapter::class)
+                ->make();
+            $dotenv = \Dotenv\Dotenv::create($repository, codecept_root_dir(), $this->paramStorage);
+
+            return $dotenv->load();
         }
 
         // symfony/dotenv
Populate $_ENV and $_SERVER with DotEnv params loader