Skip to content

Latest commit

 

History

History
executable file
·
48 lines (31 loc) · 3.18 KB

README.md

File metadata and controls

executable file
·
48 lines (31 loc) · 3.18 KB

Dev Testing Staging

Programming Best Practices

You should follow common programming best practices to reduce bugs and improve the quality and maintainability of your work.

Read the documentation: https://devdocs.magento.com/

Recommended reading: Complete Guide on Magento 2 Development Best Practices

Work process

This is basically the work process we follow https://guides.github.com/introduction/flow/ The status flow for the task that you are working on should be: Todo ➝ In progress ➝ PR Submitted ➝ PR Approved (Deploy to testing env) ➝ Ready for QA ➝ QA Passed ➝ Version it and Merged to Staging ➝ Rebase testing branch to staging (resolve any conflicts with the authors of the affected code)

Testing environment

If you need to test your changes you can push to the dev above so they get deployed. When pushing to the branch, if the previous push was recent then check with the owner of the commit if they have finished testing to avoid overwriting someone else's work.

The Testing environment

The testing branch is for QA, after your PR is approved deploy changes to testing for QA to test it. After it is QA passed then you can version it and merge to staging.

Staging environment

The staging branch is for QA, we should strive to keep it as stable as the production environment.

Working Branch

Please use your own working branch when working on an issue. Remember to always rebase with the staging branch.

Semantic Commit Messages

For your commit names, you must follow the guideline here https://gist.github.com/joshbuchea/6f47e86d2510bce28f8e7f42ae84c716 and include the task ID in the commit message.

Pull request

Properly format your code using PHP Intelephense and Prettier.

Please check your code by running GrumPHP for any issues and try to fix as many as possible without creating significant overheads on the task that you were working on.

See Why You Need Code Sniffers for Web Development.

Run: composer grum-changed

After you have tested and are satisfied with the work in your working branch, submit a pull-request against the staging branch.

All pull-requests need to have at least one approval before been merged to staging.

Merge to staging and versioning

It is the responsibility of the PR owner to merge their own PR.