Skip to content

Latest commit

 

History

History
51 lines (37 loc) · 2.91 KB

Collaborating.md

File metadata and controls

51 lines (37 loc) · 2.91 KB

How to collaborate?

Setup your environment

Please read Setup.md.

Workflow

We work with the GitHub Flow. Basically, you should never commit changes directly on origin/master. The branch origin/master should always be ready to be deployed on the production server. It should be stable.

Schema

When working on a new feature or a bugfix, you should always follow this workflow:

  1. Create a new branch with an appropriate name (see Branch naming)
  • Inform your collaborators on Slack
  1. Work on this branch
  • When committing, refer to other people with @mention and to issues with #number.
  1. Test your modifications
  • Tests should be made continuously during your development
  1. Create a pull request
  • You can create the pull request as soon as you create the branch so that team collaborators can discuss about the feature/fix.
  1. Wait for the review of the team members
  • They comment about the code/feature and test the changes
  1. Your modifications will be merged either by you or one of the team members when reviewed.
  2. Delete that branch

Branch naming

If you want to implement a new feature, give a representative name to the branch (eg. "survey").

If you want to fix a bug, name the branch "fix-*" where * is the page/feature it is related to (eg. "fix-events").

Deployment

See Deploy.md. Once deployed, you should set a new release tag.

Example: say the previous version was 1.2.1. If there are new features in the deployed modifications, name the release 1.3. If there are only bug fixes, name the release 1.2.2. Switching to 2.0 would require a complete refactoring of the code or major new features: you should discuss with your collaborators.

Conventions

PHP Coding Standards

Phy'sbook follows the PHP coding standards of Symfony, particularly PSR-2.

You should run the PHP Coding Standards Fixer before each commit :

  • php php-cs-fixer.phar fix src/

Rules on origin/master

You should not commit/merge on origin/master any commented code, incomplete feature or TODO/FUTURE/FIXME comments. However, you can do it in your branches.

Interesting articles