Skip to content

Commit

Permalink
Allow minor version of vlucas/phpdotenv
Browse files Browse the repository at this point in the history
  • Loading branch information
dsturm committed Nov 30, 2020
1 parent bc23dfc commit 1af2d52
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"require": {
"php": ">=7.1",
"composer/installers": "^1.8",
"vlucas/phpdotenv": "^5.2",
"vlucas/phpdotenv": "^4.1.8||^5.2",
"oscarotero/env": "^2.1",
"roots/bedrock-autoloader": "^1.0",
"roots/wordpress": "5.5.1",
Expand Down
2 changes: 1 addition & 1 deletion composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion config/application.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@
/**
* Use Dotenv to set required environment variables and load .env file in root
*/
$dotenv = Dotenv\Dotenv::createUnsafeImmutable($root_dir);
$dotenv = method_exists('\\Dotenv\\Dotenv', 'createUnsafeImmutable') ?
Dotenv\Dotenv::createUnsafeImmutable($root_dir) :
Dotenv\Dotenv::createImmutable($root_dir);
if (file_exists($root_dir . '/.env')) {
$dotenv->load();
$dotenv->required(['WP_HOME', 'WP_SITEURL']);
Expand Down

0 comments on commit 1af2d52

Please sign in to comment.