-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove post install .env copy #595
Conversation
fe80e07
to
3e50697
Compare
I find the Also, this change would break my wp-cli Edit: I may have misunderstood the change here – I read this as |
I like this change. I think it's great for new players to Bedrock that might not be familiar with it. Following a README that asks to explicitly copy .env.example to .env will make them away of this file from the get-go. |
3e50697
to
bce8544
Compare
Suggestion: if bedrock/config/application.php Line 32 in e940020
Similar to https://github.com/roots/sage/blob/6d66debe17dc413cd9f276ddb42a368bf0dc844d/functions.php#L15 |
This doesn't work for dockerized environments where the environment variables are set by the container orchestrator (Kubernetes, heroku, etc). .env should only be used if you don't have first-class environment variable management. |
@swalkinshaw |
`.env.example` is just an example and doesn't contain useful defaults. Copying this file can be confusing since it needs to be edited regardless. By not copying this file, we'll surface errors of missing config values sooner since they'll be no default values.
bce8544
to
c133e36
Compare
Reflects the changes in roots/bedrock#595
Reflects the changes in roots/bedrock#595
commit eead6f6 Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Date: Thu Oct 12 16:49:31 2023 -0500 fix(deps): ⬆️ bump roots/wordpress to v6.3.2 (roots#689) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> commit d5ee9d5 Author: Ben Word <ben@benword.com> Date: Tue Oct 10 19:25:07 2023 -0500 📝 Update README [ci skip] commit a90180a Author: Ben Word <ben@benword.com> Date: Wed Sep 27 10:10:41 2023 -0500 📝 Update README [ci skip] commit 64a5624 Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Date: Tue Aug 29 09:59:58 2023 -0500 fix(deps): ⬆️ bump roots/wordpress to v6.3.1 (roots#685) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> commit 149bdab Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Date: Tue Aug 15 08:52:55 2023 -0500 fix(deps): ⬆️ bump wpackagist-theme/twentytwentythree to v1.2 (roots#683) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> commit 7aa70cd Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Date: Tue Aug 8 17:14:03 2023 -0500 fix(deps): ⬆️ bump roots/wordpress to v6.3 (roots#682) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> commit 50a86d4 Author: Scott Walkinshaw <scott.walkinshaw@gmail.com> Date: Sat Jul 15 20:32:00 2023 -0400 Remove post install .env copy (roots#595) `.env.example` is just an example and doesn't contain useful defaults. Copying this file can be confusing since it needs to be edited regardless. By not copying this file, we'll surface errors of missing config values sooner since they'll be no default values. commit 9223c3b Author: Dareth NHANG <DSGND@users.noreply.github.com> Date: Tue Jun 13 20:04:50 2023 +0200 Support `local` as `WP_ENVIRONMENT_TYPE` (roots#681) commit 052bf9d Author: Scott Walkinshaw <scott.walkinshaw@gmail.com> Date: Tue Jun 6 08:48:46 2023 -0400 Add integration test workflow (roots#678) commit 8bc7fb4 Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Date: Mon May 22 10:16:24 2023 -0500 fix(deps): ⬆️ bump roots/wordpress to v6.2.2 (roots#677) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> commit 5993b4e Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Date: Tue May 16 15:40:25 2023 -0500 fix(deps): ⬆️ bump roots/wordpress to v6.2.1 (roots#676) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> commit 96dbd4e Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Date: Mon Apr 17 17:38:58 2023 -0500 fix(deps): ⬆️ bump wpackagist-theme/twentytwentythree to v1.1 (roots#675) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> commit a4eb209 Author: Ben Word <ben@benword.com> Date: Wed Mar 29 16:38:02 2023 -0500 🔥 Delete CHANGELOG commit 6713c24 Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Date: Wed Mar 29 16:36:38 2023 -0500 fix(deps): ⬆️ bump roots/wordpress to v6.2 (roots#673) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> commit 09627b1 Author: Ben Word <ben@benword.com> Date: Tue Mar 7 18:30:36 2023 -0600 📝 Update README [ci skip] commit cbc53e0 Author: Ben Word <ben@benword.com> Date: Wed Mar 1 17:33:36 2023 -0600 💡 Update comments commit de66196 Author: Oleg Voronkovich <oleg-voronkovich@yandex.ru> Date: Wed Mar 1 20:53:06 2023 +0300 Don't instantiate Dotenv if .env file not exists (roots#670) commit 20167f3 Author: Ben Word <ben@benword.com> Date: Tue Feb 28 00:04:13 2023 -0600 📝 Update README commit e14658b Author: Oleg Voronkovich <oleg-voronkovich@yandex.ru> Date: Thu Feb 16 01:31:08 2023 +0300 Support WP_ENVIRONMENT_TYPE (roots#668)
* use `Dotenv::createImmutable()` see roots/bedrock#714 * Remove post install .env copy see roots/bedrock#595 * inline comments end in full stops
* use `Dotenv::createImmutable()` see roots/bedrock#714 * Remove post install .env copy see roots/bedrock#595 * inline comments end in full stops
* use `Dotenv::createImmutable()` see roots/bedrock#714 * Remove post install .env copy see roots/bedrock#595 * inline comments end in full stops
.env.example
is just an example and doesn't contain useful defaults. Copying this file can be confusing since it needs to be edited regardless. By not copying this file, we'll surface errors of missing config values sooner since they'll be no default values.This is an alternative to #587 and #586
Docs PR: roots/docs#476