Skip to content

Commit

Permalink
support vlucas/phpdotenv ^2.5 | ^3.4 - and use one or the other
Browse files Browse the repository at this point in the history
  • Loading branch information
Oliver Stark committed Aug 12, 2019
1 parent 1ed5aad commit 4de89c2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions bin/craft-copy-env.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@

// dotenv? 3.x vs 2.x
if (file_exists($root . '/.env')) {
$dotenv = (method_exists('DotEnv\DotEnv', 'create'))
? DotEnv\DotEnv::create($root)
: new Dotenv\Dotenv($root);
$dotenv = (method_exists('\Dotenv\Dotenv', 'create'))
? \Dotenv\Dotenv::create($root)
: new \Dotenv\Dotenv($root);
$dotenv->load();
}

Expand Down
6 changes: 3 additions & 3 deletions bin/craft-copy-import-db.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@

// dotenv? 3.x vs 2.x
if (file_exists($root . '/.env')) {
$dotenv = (method_exists('DotEnv\DotEnv', 'create'))
? DotEnv\DotEnv::create($root)
: new Dotenv\Dotenv($root);
$dotenv = (method_exists('\Dotenv\Dotenv', 'create'))
? \Dotenv\Dotenv::create($root)
: new \Dotenv\Dotenv($root);
$dotenv->load();
}

Expand Down

0 comments on commit 4de89c2

Please sign in to comment.