Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
root = true

[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
indent_style = space
indent_size = 4
trim_trailing_whitespace = true

[*.md]
trim_trailing_whitespace = false

[*.yml]
indent_style = space
indent_size = 2
9 changes: 5 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,15 @@ Follow the instructions at [xdebug.org](http://xdebug.org/wizard.php)

- 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/)
- Follow [PSR-2](http://www.php-fig.org/psr/psr-2/) (_will be auto-enforced by php-cs-fixer in a later step_)

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)
1. 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).
1. Ensure automated tests pass
1. Run `composer run-script fix-style` to enforce PSR-2 style
1. 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
Expand Down
62 changes: 32 additions & 30 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,33 +1,35 @@
{
"name": "sparkpost/php-sparkpost",
"description": "Client library for interfacing with the SparkPost API.",
"license": "Apache 2.0",
"authors": [
{
"name": "SparkPost"
}
],
"minimum-stability": "stable",
"scripts": {
"post-install-cmd": "if [ ! -f 'examples/example-config.json' ]; then echo '{\n\t\"api-key\":\"Your API Key\"\n}' >> examples/example-config.json; fi",
"post-update-cmd": "if [ ! -f 'examples/example-config.json' ]; then echo '{\n\t\"api-key\":\"Your API Key\"\n}' >> examples/example-config.json; fi",
"test": "phpunit ./test/unit/"
},
"require": {
"php": ">=5.5.0",
"egeloen/http-adapter": "*"
},
"require-dev": {
"phpunit/phpunit": "4.3.*",
"guzzlehttp/guzzle": "6.*",
"mockery/mockery": "^0.9.4",
"satooshi/php-coveralls": "dev-master"
},
"autoload": {
"psr-4": {
"SparkPost\\": "lib/SparkPost/",
"SparkPost\\SendGridCompatibility\\": "lib/SendGridCompatibility/",
"SparkPost\\Test\\TestUtils\\": "test/unit/TestUtils/"
}
"name": "sparkpost/php-sparkpost",
"description": "Client library for interfacing with the SparkPost API.",
"license": "Apache 2.0",
"authors": [
{
"name": "SparkPost"
}
],
"minimum-stability": "stable",
"scripts": {
"post-install-cmd": "if [ ! -f 'examples/example-config.json' ]; then echo '{\n\t\"api-key\":\"Your API Key\"\n}' >> examples/example-config.json; fi",
"post-update-cmd": "if [ ! -f 'examples/example-config.json' ]; then echo '{\n\t\"api-key\":\"Your API Key\"\n}' >> examples/example-config.json; fi",
"test": "phpunit ./test/unit/",
"fix-style": "php-cs-fixer fix ."
},
"require": {
"php": ">=5.5.0",
"egeloen/http-adapter": "*"
},
"require-dev": {
"phpunit/phpunit": "4.3.*",
"guzzlehttp/guzzle": "6.*",
"mockery/mockery": "^0.9.4",
"satooshi/php-coveralls": "dev-master",
"fabpot/php-cs-fixer": "^1.11"
},
"autoload": {
"psr-4": {
"SparkPost\\": "lib/SparkPost/",
"SparkPost\\SendGridCompatibility\\": "lib/SendGridCompatibility/",
"SparkPost\\Test\\TestUtils\\": "test/unit/TestUtils/"
}
}
}
Loading