|
| 1 | +Contributing Guidelines |
| 2 | +======================= |
| 3 | + |
| 4 | +Choosing the right branch |
| 5 | +------------------------- |
| 6 | + |
| 7 | +Before working on a patch, you must determine on which branch you need to work: |
| 8 | + |
| 9 | +* `1.3`, if you are fixing a bug for an existing feature (you may have to choose a higher branch if the feature you are fixing was introduced in a later version) |
| 10 | +* `master`, if you are adding a new and backward incompatible feature. |
| 11 | + |
| 12 | +Working on your code |
| 13 | +-------------------- |
| 14 | + |
| 15 | +Fork, then clone the repo: |
| 16 | + |
| 17 | + git clone git@github.com/your-username/CsaGuzzleBundle.git |
| 18 | + |
| 19 | +Create your working branch, based on the correct branch (replace `1.3` with the correct target branch): |
| 20 | + |
| 21 | + git checkout -b BRANCH_NAME -t origin/1.3 |
| 22 | + |
| 23 | +`BRANCH_NAME` should be descriptive (`ticket_XXX` where `XXX` is the ticket number is a good convention for bug fixes). |
| 24 | + |
| 25 | +Install dependencies: |
| 26 | + |
| 27 | + composer update |
| 28 | + |
| 29 | +Make sure the tests pass: |
| 30 | + |
| 31 | + vendor/bin/phpunit |
| 32 | + |
| 33 | +Push to your fork and [submit a pull request](https://github.com/csarrazi/CsaGuzzleBundle/compare/). |
| 34 | + |
| 35 | +At this point you're waiting on me. I like to at least comment on pull requests within |
| 36 | +three business days (and, typically, one business day). I may suggest some changes or |
| 37 | +improvements or alternatives. |
| 38 | + |
| 39 | +Some things that will increase the chance that your pull request is accepted: |
| 40 | + |
| 41 | +* Write tests. |
| 42 | +* Follow [PSR-1](http://www.php-fig.org/psr/psr-1/) and [PSR-2](http://www.php-fig.org/psr/psr-2/). |
| 43 | +* Write a [good commit message](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html). |
| 44 | + |
| 45 | +Pull request template |
| 46 | +--------------------- |
| 47 | + |
| 48 | +```markdown |
| 49 | +| Q | A |
| 50 | +| ------------- | --- |
| 51 | +| Bug fix? | [yes|no] |
| 52 | +| New feature? | [yes|no] |
| 53 | +| BC breaks? | [yes|no] |
| 54 | +| Deprecations? | [yes|no] |
| 55 | +| Tests pass? | [yes|no] |
| 56 | +| Fixed tickets | [comma separated list of tickets fixed by the PR] |
| 57 | +| License | Apache License 2.0 |
| 58 | +``` |
| 59 | + |
| 60 | +Notes |
| 61 | +----- |
| 62 | + |
| 63 | +All bug fixes merged into maintenance branches are also merged into more recent |
| 64 | +branches on a regular basis. For instance, if you submit a patch for the 1.3 branch, |
| 65 | +the patch will also be applied by the core team on the master branch. |
0 commit comments