Skip to content

Commit 33a3817

Browse files
author
Daniel Noel-Davies
committed
Upgrade usage of DotEnv class so it can be used with Laravel 5.8
1 parent e586d55 commit 33a3817

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

bin/dredd-hooks-laravel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ if (!$loaded) {
3232

3333
// Laravel will not overwrite existing environment variables, so we'll pull in custom ones here
3434
if (file_exists($basePath . '/.env.dredd')) {
35-
$dotenv = new Dotenv\Dotenv($basePath, '.env.dredd');
35+
$dotenv = new Dotenv\Dotenv(new \Dotenv\Loader([$basePath . '/.env.dredd'], new \Dotenv\Environment\DotenvFactory()));
3636
$dotenv->overload();
3737
}
3838

server.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
// Laravel will not overwrite existing environment variables, so we'll pull in custom ones here
99
if (file_exists($basePath . '/.env.dredd')) {
10-
$dotenv = new Dotenv\Dotenv($basePath, '.env.dredd');
10+
$dotenv = new Dotenv\Dotenv(new \Dotenv\Loader([$basePath . '/.env.dredd'], new \Dotenv\Environment\DotenvFactory()));
1111
$dotenv->overload();
1212
}
1313

0 commit comments

Comments
 (0)