| 1 |
# Contributions Welcome! |
| 2 |
|
| 3 |
Pull Requests and Community Contributions are the bread and butter of open source software. Every contribution- from bug |
| 4 |
reports to feature requests, typos to full new features- are greatly appreciated. |
| 5 |
|
| 6 |
|
| 7 |
## Important Guidelines |
| 8 |
|
| 9 |
* One Item Per Pull Request or Issue. This makes it much easier to review code and merge it back in, and prevents issues |
| 10 |
with one request from blocking another. |
| 11 |
|
| 12 |
* Code Coverage is extremely important, and pull requests are much more likely to be accepted if testing is also improved. |
| 13 |
New code should be properly tested, and all tests must pass. |
| 14 |
|
| 15 |
* Read the LICENSE document and make sure you understand it, because your code is going to be released under it. |
| 16 |
|
| 17 |
* Be prepared to make revisions. Don't be discouraged if you're asked to make changes, as that is just another step |
| 18 |
towards refining the code and getting it merged back in. |
| 19 |
|
| 20 |
* Remember to add the relevant documentation, particular the docblock comments. |
| 21 |
|
| 22 |
|
| 23 |
## Code Styling |
| 24 |
|
| 25 |
This project follows the PSR standards set forth by the [PHP Framework Interop Group](http://www.php-fig.org/). |
| 26 |
|
| 27 |
* [PSR-0: Class and file naming conventions](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-0.md) |
| 28 |
* [PSR-1: Basic coding standard](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-1-basic-coding-standard.md) |
| 29 |
* [PSR-2: Coding style guide](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md) |
| 30 |
|
| 31 |
All code most follow these standards to be accepted. The easiest way to accomplish this is to run php-cs-fixer once the |
| 32 |
new changes are finished. The php-cs-fixer package is installed as a development dependency of this project. |
| 33 |
|
| 34 |
composer install --dev |
| 35 |
vendor/bin/php-cs-fixer fix ./ --level="all" -vv |
| 36 |
|
| 37 |
|
| 38 |
## Running the test suite |
| 39 |
|
| 40 |
First install dependencies using Composer. It's important to include the dev packages: |
| 41 |
|
| 42 |
composer install --dev |
| 43 |
|
| 44 |
The "runTests.sh" script runs the full test suite- phpunit, php-cs-fixer, as well as any environmental setup: |
| 45 |
|
| 46 |
tests/runTests.sh |
| 47 |
|
| 48 |
To call phpunit directly: |
| 49 |
|
| 50 |
vendor/bin/phpunit |
| 51 |
|
| 52 |
To call php-cs-fixer directly: |
| 53 |
|
| 54 |
vendor/bin/php-cs-fixer fix ./ --level="all" -vv --dry-run |