Replies: 1 comment 1 reply
-
I guess for an environment other than production?
I think an explicit confirmation to overwrite the app key on any environment is a sensible thing to do so I think this makes sense. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Issue
The command for
key:generate
has some confusing behavior on when it may over-writes theAPP_KEY
in a.env
file.The main function that does the work has a conditional:
The way this reads is:
This means that:
APP_KEY
is written to (there's no prompt about the environment).--force
is only related to theproduction
environmentHere's the output of an app in
production
with noAPP_KEY
set. When it's set, I get the prompt:Proposed Change
For Laravel 8, I'd like to float the following change:
APP_KEY
won't be over-written by default--force
flag - it's use will over-writeAPP_ENV
even if there is a value.We can still use the
ConfirmableTrait
for this, so the code change is pretty minimal.I'd consider it a breaking change since it's definitely a bit different that what it was before. However I think it would be more clear this way, and potentially less error prone (This behavior came to my attention when some automation over-wrote an APP_KEY value at work).
Beta Was this translation helpful? Give feedback.
All reactions