|
| 1 | +Thanks for contributing—you rock! |
| 2 | + |
| 3 | +# Getting Started |
| 4 | + |
| 5 | +* Make sure you have a [GitHub account](https://github.com/signup/free). |
| 6 | +* See if your issue has been discussed (or even fixed) earlier. You can [search for existing issues](../../../issues?q=is%3Aissue). |
| 7 | +* Assuming it does not already exist, [create a new issue](../../../issues/new). |
| 8 | + * Clearly describe the issue. In case you want to report a bug, include steps to reproduce it. |
| 9 | + * Make sure you fill in the earliest version that you know has the issue. |
| 10 | +* Fork the repository on GitHub. |
| 11 | + |
| 12 | +# Making Changes |
| 13 | + |
| 14 | +* Create a topic branch from where you want to base your work. |
| 15 | + * Only target release branches if you are certain your fix must be on that branch. |
| 16 | + * To quickly create a topic branch based on the `master` branch: |
| 17 | + * `git checkout -b issue/%YOUR-ISSUE-NUMBER%_%DESCRIPTIVE-TITLE% version/2` |
| 18 | + * a good example is `issue/123_typo_in_readme` |
| 19 | +* Make commits of logical units. |
| 20 | +* Make sure your commit messages are helpful. |
| 21 | + |
| 22 | +## Quality checks |
| 23 | + |
| 24 | +Before submitting a PR, please run code quality checks via: |
| 25 | + |
| 26 | +```shell |
| 27 | +$ composer qa |
| 28 | +``` |
| 29 | + |
| 30 | +The command will run PHPCS and Psalm checks as well as PHPUnit tests. |
| 31 | + |
| 32 | +### Run specific unit tests |
| 33 | + |
| 34 | +Unit tests are organized in fixture files (see [`/tests/unit/fixtures`](https://github.com/inpsyde/php-coding-standards/tree/version/2/tests/unit/fixtures)). |
| 35 | + |
| 36 | +To run a single test use the `--filter` option: |
| 37 | + |
| 38 | +```shell |
| 39 | +$ composer tests -- --filter function-length-no-blank-lines |
| 40 | +``` |
| 41 | + |
| 42 | +# Submitting Changes |
| 43 | + |
| 44 | +* Push your changes to the according topic branch in your fork of the repository. |
| 45 | +* [Create a pull request](../../../compare) to our repository. |
| 46 | +* Wait for feedback. The team looks at pull requests on a regular basis. |
| 47 | + |
| 48 | +# License |
| 49 | + |
| 50 | +By contributing code, you grant its use under the [MIT License](../LICENSE). |
0 commit comments