Skip to content

Commit 9a58cd3

Browse files
committed
Actually added the file this time
1 parent dd189aa commit 9a58cd3

File tree

1 file changed

+72
-0
lines changed

1 file changed

+72
-0
lines changed

CONTRIBUTING.md

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
# Contributing to php-sparkpost
2+
Transparency is one of our core values, and we encourage developers to contribute and become part of the SparkPost developer community.
3+
4+
The following is a set of guidelines for contributing to php-sparkpost,
5+
which is hosted in the [SparkPost Organization](https://github.com/sparkpost) on GitHub.
6+
These are just guidelines, not rules, use your best judgment and feel free to
7+
propose changes to this document in a pull request.
8+
9+
## Submitting Issues
10+
* You can create an issue [here](https://github.com/sparkpost/php-sparkpost/issues/new), but
11+
before doing that please read the notes below on debugging and submitting issues,
12+
and include as many details as possible with your report.
13+
* Include the version of python-sparkpost you are using.
14+
* Perform a [cursory search](https://github.com/issues?utf8=%E2%9C%93&q=is%3Aissue+user%3Asparkpost+repo%3Aphp-sparkpost)
15+
to see if a similar issue has already been submitted.
16+
17+
## Development
18+
19+
### Setup (Getting the Tools)
20+
#### Install Composer
21+
```
22+
curl -sS https://getcomposer.org/installer | php
23+
```
24+
25+
Add composer install directory to $PATH `~/.composer/vendor/bin/`
26+
27+
#### Install PHPUnit for Testing
28+
```
29+
composer global require "phpunit/phpunit=4.3.*"
30+
```
31+
32+
We recommend increasing PHP’s memory limit, by default it uses 128MB. We ran into some issues during local development without doing so. You can do this by editing your php.ini file and modifying `memory_limit`. We set ours to `memory_limit = 1024M`.
33+
34+
#### Install XDebug for code coverage generation
35+
Follow the instructions at [xdebug.org](http://xdebug.org/wizard.php)
36+
37+
#### Development Tool Resources
38+
* https://getcomposer.org/doc/00-intro.md#globally-on-osx-via-homebrew-
39+
* https://phpunit.de/manual/current/en/installation.html
40+
41+
### Local Development
42+
* Fork [this repository](http://github.com/SparkPost/php-sparkpost)
43+
* Clone your fork
44+
* Run `composer install`
45+
* Write code!
46+
47+
### Contribution Steps
48+
49+
#### Guidelines
50+
51+
- Provide documentation for any newly added code.
52+
- Provide tests for any newly added code.
53+
- Follow [PSR-1](http://www.php-fig.org/psr/psr-1/)
54+
55+
1. Create a new branch named after the issue you’ll be fixing (include the issue number as the branch name, example: Issue in GH is #8 then the branch name should be ISSUE-8))
56+
2. Write corresponding tests and code (only what is needed to satisfy the issue and tests please)
57+
* Include your tests in the 'test' directory in an appropriate test file
58+
* Write code to satisfy the tests
59+
3. Ensure automated tests pass
60+
4. Send a pull request and bug the maintainer until it gets merged and published. :) Make sure to add yourself to [AUTHORS](https://github.com/SparkPost/php-sparkpost/blob/master/AUTHORS.md).
61+
62+
63+
### Testing
64+
Once you are setup for local development:
65+
* You can execute the unit tests using: `composer test`
66+
* You can view coverage information by viewing: `open test/output/report/index.html`
67+
68+
## Releasing
69+
70+
* Update version information in composer.json during development.
71+
* Once its been merged down, create a release tag in git.
72+
* Composer will automatically pickup the new tag and present it as a release.

0 commit comments

Comments
 (0)