Skip to content
This repository was archived by the owner on May 13, 2023. It is now read-only.

Commit faa4e3d

Browse files
committed
Updates CONTRIBUTING guide
1 parent d9a78a6 commit faa4e3d

File tree

1 file changed

+80
-0
lines changed

1 file changed

+80
-0
lines changed

CONTRIBUTING.md

+80
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
# Contributing
2+
3+
If you're here, you would like to contribute to this repository and you're really welcome!
4+
5+
6+
## Bug reports
7+
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:
10+
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
14+
15+
16+
## Security issues
17+
18+
If you discover any security related issues, please contact us at [[email protected]](mailto:[email protected]) instead of submitting an issue on Github.
19+
20+
21+
## Feature requests
22+
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.
27+
28+
29+
## Sending a Pull Request
30+
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:
32+
33+
``` bash
34+
$ git clone [email protected]:your-name/repo-name.git
35+
$ git checkout -b feature-or-bug-fix-description
36+
```
37+
38+
Then install the dependencies through [Composer](https://getcomposer.org/):
39+
40+
``` bash
41+
$ composer install
42+
```
43+
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/))
45+
46+
When you are ready with the code, tested it and documented it, you can commit and push it with the following commands:
47+
48+
``` bash
49+
$ git commit -m "Feature or bug fix description"
50+
$ git push origin feature-or-bug-fix-description
51+
```
52+
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.
54+
55+
Then [create a pull request](https://help.github.com/articles/creating-a-pull-request/) on GitHub.
56+
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):
58+
59+
``` bash
60+
$ git rebase -i HEAD~3
61+
```
62+
63+
If your branch conflicts with the master branch, you will need to rebase and repush it with the following commands:
64+
65+
``` bash
66+
$ git remote add upstream [email protected]:php-http/repo-name.git
67+
$ git pull --rebase upstream master
68+
$ git push -f origin feature-or-bug-fix-description
69+
```
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)