Skip to content

Commit b341b0d

Browse files
committed
feature #35308 [Dotenv] Add Dotenv::bootEnv() to check for .env.local.php before calling Dotenv::loadEnv() (nicolas-grekas)
This PR was merged into the 5.1-dev branch. Discussion ---------- [Dotenv] Add Dotenv::bootEnv() to check for .env.local.php before calling Dotenv::loadEnv() | Q | A | ------------- | --- | Branch? | master | Bug fix? | no | New feature? | yes | Deprecations? | yes | Tickets | - | License | MIT | Doc PR | - The goal of this PR is to eventually get rid of the `config/bootstrap.php` file in Symfony 5.1 apps. I think we've done enough iterations on that piece of bootstrapping logic to put it inside the `Dotenv` component. This fully replaces https://github.com/symfony/recipes/blob/master/symfony/framework-bundle/4.2/config/bootstrap.php It doesn't conflict with current apps so they'll be fine keeping the `config/bootstrap.php` file until they're upgraded. The new bootstrapping logic will require adding this line in `bin/console` and `public/index.php`: ```php (new Dotenv())->bootEnv(dirname(__DIR__).'/.env'); ``` Recipes updated at symfony/recipes#724 Commits ------- 98c7d3027b [Dotenv] Add Dotenv::bootEnv() to check for .env.local.php before calling Dotenv::loadEnv()
2 parents 67fa5c6 + f23bfbb commit b341b0d

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
},
4242
"conflict": {
4343
"symfony/dependency-injection": "<4.4",
44+
"symfony/dotenv": "<5.1",
4445
"symfony/event-dispatcher": "<4.4",
4546
"symfony/lock": "<4.4",
4647
"symfony/process": "<4.4"

0 commit comments

Comments
 (0)