Skip to content

Keep a record of historic values #14

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

Conversation

bottlenosecreative
Copy link

Instead of outright deleting/replacing the previous env file key/values, we can comment out the previous value and include a timecode. This helps developers to debug changes made by other users.

To enable history add the following to your .env:

ENVSET_HISTORY=true

No idea if others will need this feature, however I needed it for my specific application so figured i'd open a PR while I was at it.

set-env-example

bottlenosecreative and others added 4 commits May 20, 2020 13:12
…w value on new line. Include timecode when it was changed.
… commented out keys with a matching value. This is important so we don't destroy the datetimes in the previously commented values and also it fixes a bug with random line breaks in the env file.
@imliam
Copy link
Owner

imliam commented May 23, 2020

Thanks for the PR - looks like a super nice feature to have available! Another merge request (#13) refactored a lot of the original command's code so this MR now conflicts.

I've quickly whipped up an updated version of this feature on this branch: https://github.com/imliam/laravel-env-set-command/tree/feature/historic-values and added some tests, although there is a test that occasionally fails for some reason that ought to be fixed first.

@bottlenosecreative
Copy link
Author

Thanks for the PR - looks like a super nice feature to have available! Another merge request (#13) refactored a lot of the original command's code so this MR now conflicts.

I've quickly whipped up an updated version of this feature on this branch: https://github.com/imliam/laravel-env-set-command/tree/feature/historic-values and added some tests, although there is a test that occasionally fails for some reason that ought to be fixed first.

I'll check out that branch later this week, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants