Skip to content

Commit

Permalink
Fix installation broken Dotenv on Laravel 5.8
Browse files Browse the repository at this point in the history
Dotenv on Laravel 5.8 was bumped to a new version which changes the bootstrap process. This BC fix allows for both installs to be used.

Fixes #614
  • Loading branch information
driesvints committed Feb 27, 2019
1 parent 98eccfd commit 1f67bf2
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/Console/DuskCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,14 @@ protected function restoreEnvironment()
*/
protected function refreshEnvironment()
{
(new Dotenv(base_path()))->overload();
// BC fix to support Dotenv ^2.2
if (! method_exists(Dotenv::class, 'create')) {
(new Dotenv(base_path()))->overload();

return;
}

Dotenv::create(base_path())->overload();
}

/**
Expand Down

0 comments on commit 1f67bf2

Please sign in to comment.