|
| 1 | +# Contributing |
| 2 | + |
| 3 | +Contributions are welcome. I accept merge requests on [GitHub][]. |
| 4 | +This project follows semantic versioning and the [semantic branching model][]. |
| 5 | + |
| 6 | +## Communication Channels |
| 7 | + |
| 8 | +You can find help and discussion in the following places: |
| 9 | + |
| 10 | +- [GitHub Issues][issues] |
| 11 | + |
| 12 | +## Reporting Bugs |
| 13 | + |
| 14 | +Bugs get tracked in the project's [issue tracker][issues]. |
| 15 | + |
| 16 | +When submitting a bug report, please include enough information to reproduce the |
| 17 | +bug. A good bug report includes the following sections: |
| 18 | + |
| 19 | +- Given input |
| 20 | +- Expected output |
| 21 | +- Actual output |
| 22 | +- Steps to reproduce, including sample code |
| 23 | +- Any other information that will help debug and reproduce the issue, including |
| 24 | + stack traces, system/environment information, screenshots or at best a |
| 25 | + merge request with a test scenario which proofs the error. |
| 26 | + |
| 27 | +## Fixing Bugs |
| 28 | + |
| 29 | +I welcome merge requests to fix bugs! |
| 30 | + |
| 31 | +If you see a bug report that you'd like to fix, please feel free to do so. |
| 32 | +See the [bug fixes][] section of the [semantic branching model][] documentation. |
| 33 | + |
| 34 | +## Adding New Features |
| 35 | + |
| 36 | +If you have an idea for a new feature, it's a good idea to check out the |
| 37 | +[issues][] or active [merge requests][] first to see if the feature has already |
| 38 | +requested and being worked on. If not, feel free to submit an issue first, asking |
| 39 | +whether the feature is beneficial to the project. This will save you from doing a |
| 40 | +lot of development work only to have your feature rejected. I don't enjoy rejecting |
| 41 | +your hard work, but some features just don't fit with the goals of the project. |
| 42 | + |
| 43 | +When you do begin working on your feature, here are some guidelines to consider: |
| 44 | + |
| 45 | +- Check the [branch semantics][] section of the [semantic branching model][] documentation. |
| 46 | +- Your merge request description should clearly detail the changes you have made. |
| 47 | + I will use this description to update the CHANGELOG. If there is no |
| 48 | + description, or it does not adequately describe your feature, I will ask you |
| 49 | + to update the description. |
| 50 | +- This package follows the **[PSR-12 coding standard][psr-12]**. Please |
| 51 | + ensure your code does, too. |
| 52 | +- Please **write tests** for any new features you add. |
| 53 | +- Please **ensure that tests pass** before submitting your merge request. |
| 54 | + This package has automatically running tests for merge requests. |
| 55 | + However, running the tests locally will help save time. |
| 56 | +- Use **feature/{issue-id}.** branches. Please do not ask to merge from your master |
| 57 | + branch. |
| 58 | +- **Submit one feature per merge request.** If you have multiple features you |
| 59 | + wish to submit, please break them up into separate merge requests. |
| 60 | +- **Write good commit messages.** Make sure each individual commit in your merge |
| 61 | + request is meaningful. If you had to make multiple intermediate commits while |
| 62 | + developing, please squash them before submitting. |
| 63 | + |
| 64 | + |
| 65 | +## Running Tests and Linters |
| 66 | + |
| 67 | +This project contains a composer wrapper script which can be executed with `./composerw` which requires docker. |
| 68 | + |
| 69 | +The following must pass before I will accept a merge request. If this does not |
| 70 | +pass, it will result in a complete build failure. Before you can run this, be |
| 71 | +sure to `./composerw init`. |
| 72 | + |
| 73 | +To run all the tests and coding standards checks, execute the following from the |
| 74 | +command line, while in the project root directory: |
| 75 | + |
| 76 | +``` |
| 77 | +./composerw lint |
| 78 | +./composerw test |
| 79 | +``` |
| 80 | + |
| 81 | +[GitHub]: https://github.com/michaelpetri/phpunit-consecutive-arguments |
| 82 | +[issues]: https://github.com/michaelpetri/phpunit-consecutive-arguments/issues |
| 83 | +[bug fixes]: https://dev-cafe.github.io/branching-model#bugfixes |
| 84 | +[branch semantics]: https://dev-cafe.github.io/branching-model/#branch-semantics |
| 85 | +[merge reqeusts]: https://github.com/michaelpetri/phpunit-consecutive-arguments/compare |
| 86 | +[semantic branching model]: https://dev-cafe.github.io/branching-model |
| 87 | +[psr-12]: https://www.php-fig.org/psr/psr-12/ |
0 commit comments