Skip to content

Commit

Permalink
compatiblity with new DotEnv setup
Browse files Browse the repository at this point in the history
  • Loading branch information
websmurf committed Oct 6, 2020
1 parent fbe7e80 commit aa70ef9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions bin/dredd-hooks-laravel
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ if (!$loaded) {

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

// Load Laravel
Expand Down
6 changes: 3 additions & 3 deletions server.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@

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

require_once $basePath . '/server.php';
require_once $basePath . '/server.php';

0 comments on commit aa70ef9

Please sign in to comment.