Skip to content

Latest commit

 

History

History
109 lines (73 loc) · 2.14 KB

File metadata and controls

109 lines (73 loc) · 2.14 KB

How to contribute

Everybody should be able to help. Here's how you can make this project more awesome:

  1. Fork it
  2. improve it
  3. submit a pull request

Your work will then be reviewed as soon as possible (suggestions about some changes, improvements or alternatives may be given).

Here's some tips to make you the best contributor ever:

Getting started

First, set up your local environment:

make lib-init

Note: Run make or make help to see all available commands.

Standard code

Use PHP CS fixer to make your code compliant with Memio's coding standards:

make cs-fix

Specifications

Memio drives its development using phpspec.

First bootstrap the code for the Specification:

make phpspec arg="describe 'Memio\Model\MyNewClass'"

Next, write the actual code of the Specification:

$EDITOR spec/Memio/Model/MyNewClassSpec.php

Then bootstrap the code for the corresponding class:

make phpspec

Follow that by writing the actual code of the class:

$EDITOR src/Memio/Model/MyNewClass.php

Finally run the specification:

make phpspec

Results should be green!

Full QA check

Before submitting your pull request, run the full QA pipeline:

make lib-qa

Keeping your fork up-to-date

To keep your fork up-to-date, you should track the upstream (original) one using the following command:

$ git remote add upstream https://github.com/memio/model.git

Then get the upstream changes:

git checkout main
git pull --rebase origin main
git pull --rebase upstream main
git checkout <your-branch>
git rebase main

Finally, publish your changes:

$ git push -f origin <your-branch>

Your pull request will be automatically updated.