Skip to content

Commit 86c946c

Browse files
committed
Updates CONTRIBUTING guide
1 parent a4fedbb commit 86c946c

File tree

1 file changed

+36
-31
lines changed

1 file changed

+36
-31
lines changed

CONTRIBUTING.md

Lines changed: 36 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -3,64 +3,58 @@
33
If you're here, you would like to contribute to this repository and you're really welcome!
44

55

6-
## Coding standard
6+
## Bug reports
77

8-
This repository follows the [PSR-2 standard](http://www.php-fig.org/psr/psr-2/) and so, if you want to contribute,
9-
you must follow these rules.
8+
If you find a bug or a documentation issue, please report it or even better: fix it :). If you report it,
9+
please be as precise as possible. Here is a little list of required information:
1010

11+
- Precise description of the bug
12+
- Details of your environment (for example: OS, PHP version, installed extensions)
13+
- Backtrace which might help identifing the bug
1114

12-
## Feature request
1315

14-
If you think a feature is missing, please report it or even better implement it :). If you report it, describe the more
15-
precisely what you would like to see implemented and we will discuss what is the best approach for it. If you can do
16-
some search before submitting it and link the resources to your description, you're awesome! It will allow us to more
17-
easily understood/implement it.
16+
## Security issues
1817

18+
If you discover any security related issues, please contact us at [security@php-http.org](mailto:security@php-http.org) instead of submitting an issue on Github.
1919

20-
## Bug report
2120

22-
If you think you have detected a bug or a doc issue, please report it or even better fix it :). If you report it,
23-
please be the more precise possible. Here a little list of required informations:
21+
## Feature requests
2422

25-
- Precise description of the bug
26-
- Details of your environment
23+
If you think a feature is missing, please report it or even better: implement it :). If you report it, describe the more
24+
precisely what you would like to see implemented and we will discuss what is the best approach for it. If you can do
25+
some search before submitting it and link the resources to your description, you're awesome! It will allow us to more
26+
easily understood/implement it.
2727

2828

29-
## Bug fix
29+
## Sending a Pull Request
3030

31-
If you're here, you are going to fix a bug and you're the best! To do it, first fork the repository, clone it and
32-
create a new branch with the following commands:
31+
If you're here, you are going to fix a bug or implement a feature and you're the best! To do it, first fork the repository, clone it and create a new branch with the following commands:
3332

3433
``` bash
3534
$ git clone git@github.com:your-name/repo-name.git
36-
$ git checkout -b bug-fix-description
35+
$ git checkout -b feature-or-bug-fix-description
3736
```
3837

39-
Then, install the dependencies through [Composer](https://getcomposer.org/):
38+
Then install the dependencies through [Composer](https://getcomposer.org/):
4039

4140
``` bash
4241
$ composer install
4342
```
4443

45-
When you're on the new branch with the dependencies, code as much as you want and when the fix is ready, don't commit
46-
it immediately. Before, you will need to add tests and update the documentation. For the tests, everything is tested with
47-
[PHPUnit](http://phpunit.de/), the documentation is in markdown format in the `gh-pages` branch.
44+
Write code and tests. When you are ready, find the testing command in the [README](README.md) and execute it. (This is usually [PHPUnit](http://phpunit.de/) or [PHPSpec](http://phpspec.net/))
4845

49-
To run the tests, use the following command:
46+
When you are ready with the code, tested it and documented it, you can commit and push it with the following commands:
5047

5148
``` bash
52-
$ vendor/bin/phpunit
49+
$ git commit -m "Feature or bug fix description"
50+
$ git push origin feature-or-bug-fix-description
5351
```
5452

55-
When you have fixed the bug, tested it and documented it, you can commit and push it with the following commands:
53+
**Note:** Please write your commit messages in the imperative and follow the [guidelines](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html) for clear and concise messages.
5654

57-
``` bash
58-
$ git commit -m "Bug fix description"
59-
$ git push origin bug-fix-description
60-
```
55+
Then [create a pull request](https://help.github.com/articles/creating-a-pull-request/) on GitHub.
6156

62-
If you have reworked you patch, please squash all your commits in a single one with the following commands (here, we
63-
will assume you would like to squash 3 commits in a single one):
57+
Please make sure that each individual commit in your pull request is meaningful. If you had to make multiple intermediate commits while developing, please squash them before submitting with the following commands (here, we assume you would like to squash 3 commits in a single one):
6458

6559
``` bash
6660
$ git rebase -i HEAD~3
@@ -71,5 +65,16 @@ If your branch conflicts with the master branch, you will need to rebase and rep
7165
``` bash
7266
$ git remote add upstream git@github.com:php-http/repo-name.git
7367
$ git pull --rebase upstream master
74-
$ git push origin bug-fix-description -f
68+
$ git push -f origin feature-or-bug-fix-description
7569
```
70+
71+
72+
## Coding standard
73+
74+
This repository follows the [PSR-2 standard](http://www.php-fig.org/psr/psr-2/) and so, if you want to contribute,
75+
you must follow these rules.
76+
77+
78+
## Semver
79+
80+
We are trying to follow [semver](http://semver.org/). When you are making BC breaking changes, please let us know why you think it is important. In this case, your patch can only be included in the next major version.

0 commit comments

Comments
 (0)