From dd189aa5fbb509c61379bfe953540d438235596b Mon Sep 17 00:00:00 2001 From: beardyman Date: Tue, 13 Oct 2015 13:53:30 -0400 Subject: [PATCH 1/3] Added CONTRIBUTING.md and updated contribution guidelines. --- README.md | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/README.md b/README.md index 0be005b..53f64a3 100644 --- a/README.md +++ b/README.md @@ -118,20 +118,3 @@ try { * If you specify a stored template and also provide inline content via `html` or `text`, you will receive an error. * By default, open and click tracking are enabled for a transmission. * By default, a transmission will use the published version of a stored template. - -## Development - -### Setup -Run `composer install` inside the directory to install dependecies and development tools. - -### Testing -Once all the dependencies are installed, you can execute the unit tests using: -``` -composer test -``` - -### Contributing -1. Check for open issues or open a fresh issue to start a discussion around a feature idea or a bug. -2. Fork [the repository](http://github.com/SparkPost/php-sparkpost) on GitHub to start making your changes to the **master** branch (or branch off of it). -3. Write a test which shows that the bug was fixed or that the feature works as expected. -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). From 9a58cd3465bfd19907b8af9f9410d784a2a35a29 Mon Sep 17 00:00:00 2001 From: beardyman Date: Tue, 13 Oct 2015 14:00:58 -0400 Subject: [PATCH 2/3] Actually added the file this time --- CONTRIBUTING.md | 72 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 CONTRIBUTING.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..f1356ba --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,72 @@ +# Contributing to php-sparkpost +Transparency is one of our core values, and we encourage developers to contribute and become part of the SparkPost developer community. + +The following is a set of guidelines for contributing to php-sparkpost, +which is hosted in the [SparkPost Organization](https://github.com/sparkpost) on GitHub. +These are just guidelines, not rules, use your best judgment and feel free to +propose changes to this document in a pull request. + +## Submitting Issues +* You can create an issue [here](https://github.com/sparkpost/php-sparkpost/issues/new), but + before doing that please read the notes below on debugging and submitting issues, + and include as many details as possible with your report. +* Include the version of python-sparkpost you are using. +* Perform a [cursory search](https://github.com/issues?utf8=%E2%9C%93&q=is%3Aissue+user%3Asparkpost+repo%3Aphp-sparkpost) + to see if a similar issue has already been submitted. + +## Development + +### Setup (Getting the Tools) +#### Install Composer +``` +curl -sS https://getcomposer.org/installer | php +``` + +Add composer install directory to $PATH `~/.composer/vendor/bin/` + +#### Install PHPUnit for Testing +``` +composer global require "phpunit/phpunit=4.3.*" +``` + +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`. + +#### Install XDebug for code coverage generation +Follow the instructions at [xdebug.org](http://xdebug.org/wizard.php) + +#### Development Tool Resources +* https://getcomposer.org/doc/00-intro.md#globally-on-osx-via-homebrew- +* https://phpunit.de/manual/current/en/installation.html + +### Local Development +* Fork [this repository](http://github.com/SparkPost/php-sparkpost) +* Clone your fork +* Run `composer install` +* Write code! + +### Contribution Steps + +#### Guidelines + +- Provide documentation for any newly added code. +- Provide tests for any newly added code. +- Follow [PSR-1](http://www.php-fig.org/psr/psr-1/) + +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)) +2. Write corresponding tests and code (only what is needed to satisfy the issue and tests please) + * Include your tests in the 'test' directory in an appropriate test file + * Write code to satisfy the tests +3. Ensure automated tests pass +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). + + +### Testing +Once you are setup for local development: +* You can execute the unit tests using: `composer test` +* You can view coverage information by viewing: `open test/output/report/index.html` + +## Releasing + +* Update version information in composer.json during development. +* Once its been merged down, create a release tag in git. +* Composer will automatically pickup the new tag and present it as a release. From 6948efd73e1e7494f26ceecc434b5918dfeb8b0d Mon Sep 17 00:00:00 2001 From: beardyman Date: Tue, 13 Oct 2015 14:36:01 -0400 Subject: [PATCH 3/3] Updated links and some other errors --- CONTRIBUTING.md | 6 +++--- README.md | 3 +++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f1356ba..9583bff 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -10,8 +10,8 @@ propose changes to this document in a pull request. * You can create an issue [here](https://github.com/sparkpost/php-sparkpost/issues/new), but before doing that please read the notes below on debugging and submitting issues, and include as many details as possible with your report. -* Include the version of python-sparkpost you are using. -* Perform a [cursory search](https://github.com/issues?utf8=%E2%9C%93&q=is%3Aissue+user%3Asparkpost+repo%3Aphp-sparkpost) +* Include the version of php-sparkpost you are using. +* Perform a [cursory search](https://github.com/SparkPost/php-sparkpost/issues?q=is%3Aissue+is%3Aopen) to see if a similar issue has already been submitted. ## Development @@ -52,7 +52,7 @@ Follow the instructions at [xdebug.org](http://xdebug.org/wizard.php) - Provide tests for any newly added code. - Follow [PSR-1](http://www.php-fig.org/psr/psr-1/) -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)) +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) 2. Write corresponding tests and code (only what is needed to satisfy the issue and tests please) * Include your tests in the 'test' directory in an appropriate test file * Write code to satisfy the tests diff --git a/README.md b/README.md index 53f64a3..12be7ee 100644 --- a/README.md +++ b/README.md @@ -118,3 +118,6 @@ try { * If you specify a stored template and also provide inline content via `html` or `text`, you will receive an error. * By default, open and click tracking are enabled for a transmission. * By default, a transmission will use the published version of a stored template. + +### Contributing +See [contributing](https://github.com/SparkPost/php-sparkpost/blob/contributing/CONTRIBUTING.md).