Skip to content

Commit 2eac822

Browse files
committed
Update pull request template and CONTRIBUTING.md with new requirements
1 parent 1d5b292 commit 2eac822

File tree

2 files changed

+18
-7
lines changed

2 files changed

+18
-7
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,10 @@ Please make sure you've read [CONTRIBUTING.md](https://github.com/cviebrock/eloq
44
before submitting your pull request, and that you have:
55

66
- [ ] provided a rationale for your change (I try not to add features that are going to have a limited user-base)
7-
- [ ] used the [PSR-2 Coding Standard](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md)
7+
- [ ] checked your coding style with `composer run style:check`
8+
- [ ] analyzed your code with `composer run analyze`
89
- [ ] added tests
10+
- [ ] confirm all old and new tests pass with `composer run tests`
911
- [ ] documented any change in behaviour (e.g. updated the `README.md`, etc.)
1012
- [ ] only submitted one pull request per feature
1113

CONTRIBUTING.md

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,27 @@ We accept contributions via pull requests via
77

88
1. Fork the project.
99
2. Create your bugfix/feature branch and write your (well-commented) code.
10-
3. Create unit tests for your code:
10+
3. Ensure you follow our coding style:
11+
- Run `composer run style:check` to check.
12+
- Run `composer run style:fix` to automagically fix styling errors.
13+
4. Run basic static analysis on your code with `composer run analyze` and fix any errors.
14+
5. Create unit tests for your code:
1115
- Run `composer install --dev` in the root directory to install required testing packages.
1216
- Add your test classes/methods to the `/tests/` directory.
13-
- Run `vendor/bin/phpunit` and make sure everything passes (new and old tests).
14-
3. Commit your changes (and your tests) and push to your branch.
15-
4. Create a new pull request against this package's `master` branch.
17+
- Run `composer run tests` and make sure everything passes (new and old tests).
18+
6. Updated any documentation (e.g. in `README.md`), if appropriate.
19+
7. Commit your changes (and your tests) and push to your branch.
20+
8. Create a new pull request against this package's `master` branch.
1621

1722

1823
## Pull Requests
1924

20-
- **Use the [PSR-2 Coding Standard](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md).**
21-
The easiest way to apply the conventions is to install [PHP Code Sniffer](http://pear.php.net/package/PHP_CodeSniffer).
25+
- **Use the [PHP-CS-Fixer Coding Standard](https://cs.symfony.com/doc/ruleSets/PhpCsFixer.html).**
26+
The easiest way to apply the conventions is to run `composer run style:fix`.
27+
28+
- **Run static analysis with [phpstan](https://phpstan.org).**
29+
The easiest way to check is with `composer run analyze`. Bonus points if you can bump up the
30+
analysis level in `phpstan.dist.neon`!
2231

2332
- **Add tests!** Your pull request won't be accepted if it doesn't have tests.
2433

0 commit comments

Comments
 (0)