Skip to content

Commit

Permalink
Bring WPCM in line with Bedrock v1.24.x (#134)
Browse files Browse the repository at this point in the history
* use `Dotenv::createImmutable()`
see roots/bedrock#714

* Remove post install .env copy
see roots/bedrock#595

* inline comments end in full stops
  • Loading branch information
jazzsequence authored Jun 27, 2024
1 parent cbda19f commit 40f32a8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
3 changes: 0 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,6 @@
]
},
"scripts": {
"post-root-package-install": [
"php -r \"copy('.env.example', '.env');\""
],
"post-install-cmd": "@maybe-create-symlinks",
"pre-update-cmd": [
"WordPressComposerManaged\\ComposerScripts::preUpdate"
Expand Down
5 changes: 4 additions & 1 deletion config/application.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
use Roots\WPConfig\Config;
use function Env\env;

// USE_ENV_ARRAY + CONVERT_* + STRIP_QUOTES.
Env\Env::$options = 31;

/**
* Directory containing all of the site's files
*
Expand All @@ -32,7 +35,7 @@
? [ '.env', '.env.pantheon', '.env.local' ]
: [ '.env', '.env.pantheon' ];

$dotenv = Dotenv\Dotenv::createUnsafeImmutable( $root_dir, $env_files, false );
$dotenv = Dotenv\Dotenv::createImmutable( $root_dir, $env_files, false );
if (
// Check if a .env file exists.
file_exists( $root_dir . '/.env' ) ||
Expand Down

0 comments on commit 40f32a8

Please sign in to comment.