Skip to content

Commit 166c496

Browse files
committed
Updates CONTRIBUTING guide
1 parent 8ddc560 commit 166c496

File tree

1 file changed

+36
-30
lines changed

1 file changed

+36
-30
lines changed

CONTRIBUTING.md

Lines changed: 36 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -3,63 +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 me to more
17-
easily understood/implement it.
16+
## Security issues
1817

18+
If you discover any security related issues, please contact us at [[email protected]](mailto:[email protected]) 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.
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.
2627

2728

28-
## Bug fix
29+
## Sending a Pull Request
2930

30-
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
31-
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:
3232

3333
``` bash
3434
$ git clone [email protected]:your-name/repo-name.git
35-
$ git checkout -b bug-fix-description
35+
$ git checkout -b feature-or-bug-fix-description
3636
```
3737

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

4040
``` bash
4141
$ composer install
4242
```
4343

44-
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
45-
it immediately. Before, you will need to add tests and update the doc. For the tests, everything is tested with
46-
[PHPUnit](http://phpunit.de/) and the doc is in the markdown format under the `doc` directory.
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/))
4745

48-
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:
4947

5048
``` bash
51-
$ vendor/bin/phpunit
49+
$ git commit -m "Feature or bug fix description"
50+
$ git push origin feature-or-bug-fix-description
5251
```
5352

54-
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.
5554

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

61-
If you have reworked you patch, please squash all your commits in a single one with the following commands (here, we
62-
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):
6358

6459
``` bash
6560
$ git rebase -i HEAD~3
@@ -70,5 +65,16 @@ If your branch conflicts with the master branch, you will need to rebase and rep
7065
``` bash
7166
$ git remote add upstream [email protected]:php-http/repo-name.git
7267
$ git pull --rebase upstream master
73-
$ git push origin bug-fix-description -f
68+
$ git push -f origin feature-or-bug-fix-description
7469
```
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)