Skip to content

Latest commit

 

History

History
104 lines (72 loc) · 2.94 KB

CONTRIBUTING.md

File metadata and controls

104 lines (72 loc) · 2.94 KB

Contributing

First of all, thank you for contributing, you are awesome!

Everybody should be able to help. Here's how you can do it:

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

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

Rules

Here are a few rules to follow in order to ease code reviews, and discussions before maintainers accept and merge your work.

  • You MUST follow the PSR-1 and PSR-2 (see Rules).
  • You MUST run the test suite (see Green tests).
  • You MUST write (or update) unit tests.
  • You SHOULD write documentation.

Please, write commit messages that make sense, and rebase your branch before submitting your Pull Request (see also how to keep your fork up-to-date).

One may ask you to squash your commits too. This is used to "clean" your Pull Request before merging it (we don't want commits such as fix tests, fix 2, fix 3, etc.).

Also, while creating your Pull Request on GitHub, you MUST write a description which gives the context and/or explains why you are creating it.

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

Green tests

Run the tests using the following script:

make test

Manual testing

If you want to manually test the error page, you can start the demo application by running the following command:

cd tests/app && bin/console assets:install && symfony serve

Then open your browser at the displayed url (something like http://127.0.0.1:8000. You can now browse urls like http://127.0.0.1:8000/error-XXX where XXX is the HTTP status code you want to test.

Standard code

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

make cs

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/jolicode/GifExceptionBundle.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.

Thank you!