|
1 |
| -Please refer to [https://github.com/sebastianbergmann/phpunit/blob/main/CONTRIBUTING.md](https://github.com/sebastianbergmann/phpunit/blob/main/.github/CONTRIBUTING.md) for details on how to contribute to this project. |
| 1 | +# Contributing to `phpunit/php-code-coverage` |
| 2 | + |
| 3 | +## Welcome! |
| 4 | + |
| 5 | +We look forward to your contributions! Here are some examples how you can contribute: |
| 6 | + |
| 7 | +* [Report a bug](https://github.com/sebastianbergmann/php-code-coverage/issues/new) |
| 8 | +* [Send a pull request to fix a bug](https://github.com/sebastianbergmann/php-code-coverage/pulls) |
| 9 | + |
| 10 | +Please do not send pull requests that expand the scope of this project (see below). |
| 11 | + |
| 12 | + |
| 13 | +## Any contributions you make will be under the BSD-3-Clause License |
| 14 | + |
| 15 | +When you submit code changes, your submissions are understood to be under the same [BSD-3-Clause License](https://github.com/sebastianbergmann/php-code-coverage/blob/main/LICENSE) that covers the project. By contributing to this project, you agree that your contributions will be licensed under its BSD-3-Clause License. |
| 16 | + |
| 17 | + |
| 18 | +## Write bug reports with detail, background, and sample code |
| 19 | + |
| 20 | +[This is an example](https://github.com/sebastianbergmann/phpunit/issues/4376) of a bug report I wrote, and I think it's not too bad. |
| 21 | + |
| 22 | +In your bug report, please provide the following: |
| 23 | + |
| 24 | +* A quick summary and/or background |
| 25 | +* Steps to reproduce |
| 26 | + * Be specific! |
| 27 | + * Give sample code if you can. |
| 28 | +* What you expected would happen |
| 29 | +* What actually happens |
| 30 | +* Notes (possibly including why you think this might be happening, or stuff you tried that didn't work) |
| 31 | + |
| 32 | +Please post code and output as text ([using proper markup](https://guides.github.com/features/mastering-markdown/)). Do not post screenshots of code or output. |
| 33 | + |
| 34 | + |
| 35 | +## Workflow for Pull Requests |
| 36 | + |
| 37 | +1. Fork the repository. |
| 38 | +2. Create your branch from the oldest branch that is affected by the bug you plan to fix. |
| 39 | +3. Implement your change and add tests for it. |
| 40 | +4. Ensure the test suite passes. |
| 41 | +5. Ensure the code complies with our coding guidelines (see below). |
| 42 | +6. Send that pull request! |
| 43 | + |
| 44 | +Please make sure you have [set up your username and email address](https://git-scm.com/book/en/v2/Getting-Started-First-Time-Git-Setup) for use with Git. Strings such as `silly nick name <root@localhost>` look really stupid in the commit history of a project. |
| 45 | + |
| 46 | +We encourage you to [sign your Git commits with your GPG key](https://docs.github.com/en/github/authenticating-to-github/signing-commits). |
| 47 | + |
| 48 | + |
| 49 | +## Development |
| 50 | + |
| 51 | +This project uses [PHPUnit](https://phpunit.de/) for testing: |
| 52 | + |
| 53 | +```shell |
| 54 | +./vendor/bin/phpunit |
| 55 | +``` |
| 56 | + |
| 57 | +This project uses [PHPStan](https://phpstan.org/) for static analysis: |
| 58 | + |
| 59 | +```shell |
| 60 | +./tools/phpstan |
| 61 | +``` |
| 62 | + |
| 63 | +This project uses [PHP-CS-Fixer](https://cs.symfony.com/) to enforce coding guidelines: |
| 64 | + |
| 65 | +```shell |
| 66 | +./tools/php-cs-fixer fix |
| 67 | +``` |
| 68 | + |
| 69 | +The commands shown above require an autoloader script at `vendor/autoload.php`. This can be generated like so: |
| 70 | + |
| 71 | +```shell |
| 72 | +./tools/composer dump-autoload |
| 73 | +``` |
| 74 | + |
| 75 | +Please understand that we will not accept a pull request when its changes violate this project's coding guidelines or break the test suite. |
0 commit comments