Commit aec783ee authored by Tobias Munk's avatar Tobias Munk

updated ENV library (vlucas/dotenv)

parent d9d32ae0
Pipeline #73651 failed with stage
in 4 minutes and 50 seconds
......@@ -9,6 +9,7 @@
* file that was distributed with this source code
*/
use Dotenv\Dotenv;
use yii\helpers\FileHelper;
$configPath = __DIR__;
......@@ -17,7 +18,7 @@ $configPath = __DIR__;
if (getenv('ENV_LOCAL_FILE')) {
$localEnv = FileHelper::normalizePath($configPath . '/' . getenv('ENV_LOCAL_FILE'));
if (is_file($localEnv)) {
$dotenvLocal = new Dotenv\Dotenv($configPath, getenv('ENV_LOCAL_FILE'));
$dotenvLocal = Dotenv::createUnsafeImmutable($configPath, getenv('ENV_LOCAL_FILE'));
$dotenvLocal->load();
} else {
exit("Error: ENV_LOCAL_FILE '{$localEnv}' not found" . PHP_EOL);
......@@ -25,7 +26,7 @@ if (getenv('ENV_LOCAL_FILE')) {
}
// Load application environment configuration
$dotenv = new Dotenv\Dotenv($configPath, '/env-defaults');
$dotenv = Dotenv::createUnsafeImmutable($configPath, '/env-defaults');
$dotenv->load();
// Basic checks & validation
......
This diff is collapsed.
......@@ -15,8 +15,8 @@
"dmstr/yii2-redirect-module": "^0.3.1",
"dmstr/yii2-filefly-module": "^1.6.0",
"dmstr/yii2-filemanager-widgets": "^1.2.0",
"dmstr/yii2-pages-module": "^2.2.0",
"dmstr/yii2-prototype-module": "^2.0.0",
"dmstr/yii2-pages-module": "^2.5.3",
"dmstr/yii2-prototype-module": "^2.2.4",
"dmstr/yii2-publication-module": "^1.2.3",
"dmstr/yii2-resque-module": "^2.0.0-alpha2",
"dmstr/yii2-widgets2-module": "^2.7.0-beta1",
......@@ -28,7 +28,7 @@
"pheme/yii2-settings": "^0.7.0",
"roave/security-advisories": "dev-master",
"schmunk42/yii2-markdocs-module": "^1.0.0",
"vlucas/phpdotenv": "2.*",
"vlucas/phpdotenv": "^5.5",
"yiisoft/yii2-dev": "~2.0.11",
"yiisoft/yii2-bootstrap": "2.*",
"yiisoft/yii2-redis": "^2.0.5",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment