|
1 | 1 | # Contributing |
2 | 2 |
|
3 | | -Contributions are welcome and will be fully credited. |
| 3 | +Contributions are welcome, and are accepted via pull requests. Please review these guidelines before submitting any pull requests. |
4 | 4 |
|
5 | | -We accept contributions via Pull Requests on [GitHub](https://github.com/staudenmeir/dusk-updater). |
| 5 | +## Guidelines |
6 | 6 |
|
7 | | -## Pull Requests |
| 7 | +* Please follow the [PSR-2 Coding Standard](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md). |
| 8 | +* Ensure that the current tests pass, and if you've added something new, add the tests where relevant. |
| 9 | +* Remember that we follow [SemVer](http://semver.org). If you are changing the behaviour, or the public api, you may need to update the docs. |
| 10 | +* Send a coherent commit history, making sure each individual commit in your pull request is meaningful. If you had to make multiple intermediate commits while developing, please [squash](http://git-scm.com/book/en/Git-Tools-Rewriting-History) them before submitting. |
| 11 | +* You may also need to [rebase](http://git-scm.com/book/en/Git-Branching-Rebasing) to avoid merge conflicts. |
8 | 12 |
|
9 | | -- **[PSR-2 Coding Standard](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md)** - The easiest way to apply the conventions is to install [PHP CS Fixer](https://github.com/FriendsOfPHP/PHP-CS-Fixer). |
| 13 | +## Running Tests |
10 | 14 |
|
11 | | -- **Add tests** - Your patch won't be accepted if it doesn't have tests. |
| 15 | +You will need an install of [Composer](https://getcomposer.org) before continuing. |
12 | 16 |
|
13 | | -- **Document any change in behaviour** - Make sure the `README.md` and any other relevant documentation are kept up-to-date. |
| 17 | +First, install the dependencies: |
14 | 18 |
|
15 | | -- **Consider our release cycle** - We try to follow [SemVer v2.0.0](http://semver.org). Randomly breaking public APIs is not an option. |
| 19 | +```bash |
| 20 | +$ composer install |
| 21 | +``` |
16 | 22 |
|
17 | | -- **Create feature branches** - Don't ask us to pull from your master branch. |
| 23 | +Then run phpunit: |
18 | 24 |
|
19 | | -- **One pull request per feature** - If you want to do more than one thing, send multiple pull requests. |
| 25 | +```bash |
| 26 | +$ vendor/bin/phpunit |
| 27 | +``` |
20 | 28 |
|
21 | | -- **Send coherent history** - Make sure each individual commit in your pull request is meaningful. If you had to make multiple intermediate commits while developing, please [squash them](http://www.git-scm.com/book/en/v2/Git-Tools-Rewriting-History#Changing-Multiple-Commit-Messages) before submitting. |
| 29 | +If the test suite passes on your local machine you should be good to go. |
22 | 30 |
|
23 | | -## Running Tests |
24 | | - |
25 | | -``` |
26 | | -vendor/bin/phpunit |
27 | | -``` |
| 31 | +When you make a pull request, the tests will automatically be run again by [Travis CI](https://travis-ci.org/) on multiple php versions and hhvm. |
0 commit comments