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
  
        
    
Uh oh!
There was an error while loading. Please reload this page.
-
Issue
The command for
key:generatehas some confusing behavior on when it may over-writes theAPP_KEYin a.envfile.The main function that does the work has a conditional:
The way this reads is:
This means that:
APP_KEYis written to (there's no prompt about the environment).--forceis only related to theproductionenvironmentHere's the output of an app in
productionwith noAPP_KEYset. When it's set, I get the prompt:Proposed Change
For Laravel 8, I'd like to float the following change:
APP_KEYwon't be over-written by default--forceflag - it's use will over-writeAPP_ENVeven if there is a value.We can still use the
ConfirmableTraitfor 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