-
Notifications
You must be signed in to change notification settings - Fork 0
Home
It is very dangerous to store sensitive data (API keys, passwords, etc.) in your code. You should separate them from the code. Where? With help comes environment variables. Storing sensitive data in environment is one of the tenets of a Twevle-factor app. You can also store credentials that change between deployment environments.
.env file MUST be in .gitignore file!
Advantages of .env:
- Easy way to set, change and hide sensitive data
- 0 editing in Apacha/Ngnix files
- Easy sharing with collaborators
- Compatible with all PHP servers
- Create .env.example (Or an otherwise named file) with template of all variables with example values
- Put it into repository
- Create .env file and paste template from example file
- Fill variables with correct values
That's all!
- Fork it
- Create your feature branch
git checkout -b my-new-feature
- Make your changes
- Run the tests, adding new ones for your own code if necessary (phpunit)
- Commit your changes
git commit -am 'Added some feature'
- Push to the branch
git push origin my-new-feature
- Create new Pull Request
Branch with specific version of project (The latest version does not necessarily include all updated)
Branch with all updates of project, but it doesn't necessarily have enough features to be a new version. (Propably not stable)
Branch with new feature actually adding to the project
X - number of version (Big updates)
X - amout of small updates in main version
X - amout of bug fixes in this version
Project is licensed under MIT License