Skip to content

Commit 60f9f40

Browse files
author
tuck1s
committed
Update user_agent version string. Impove CONTRIBUTIND.md
1 parent 4bdb24c commit 60f9f40

File tree

2 files changed

+37
-6
lines changed

2 files changed

+37
-6
lines changed

Diff for: CONTRIBUTING.md

+36-5
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,41 @@ curl -sS https://getcomposer.org/installer | php
2424

2525
Add composer install directory to $PATH `~/.composer/vendor/bin/`
2626

27-
#### Install PHPUnit for Testing
28-
```
29-
composer global require "phpunit/phpunit=4.8.*"
27+
### phpenv
28+
29+
[phpenv](https://github.com/phpenv/phpenv-installer) is useful for testing locally across different PHP versions.
30+
31+
### Developing your app against a local version of the SparkPost library
32+
33+
If you're working on the library and your app together, you can tell Composer to get `php-sparkpost` from a local path. With a directory structure such as:
34+
35+
home
36+
- php-sparkpost
37+
- my-app
38+
- composer.json
39+
- .. etc
40+
41+
Use the following for `my-app/composer.json`:
42+
```json
43+
{
44+
"name": "sparkpost/php_simple_email_send",
45+
"description": "a small test program to send an email",
46+
"repositories": [
47+
{
48+
"type": "path",
49+
"url": "../php-sparkpost"
50+
}
51+
],
52+
"require": {
53+
"php-http/guzzle6-adapter": "^1.1",
54+
"guzzlehttp/guzzle": "^6.0",
55+
"sparkpost/sparkpost": "dev-master"
56+
}
57+
}
3058
```
3159

60+
61+
### Memory
3262
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`.
3363

3464
#### Install XDebug for code coverage generation
@@ -68,6 +98,7 @@ Once you are setup for local development:
6898

6999
## Releasing
70100

71-
* Update version information in composer.json during development.
72-
* Once its been merged down, create a release tag in git.
101+
* Update version in the [library](https://github.com/SparkPost/php-sparkpost/blob/eeb6ba971584fcc4c12fd69247c6b24df7827af5/lib/SparkPost/SparkPost.php#L16) during development. This is used in the `user_agent` of your requests.
102+
103+
* Once it's been merged down, create a release tag in git.
73104
* Composer will automatically pickup the new tag and present it as a release.

Diff for: lib/SparkPost/SparkPost.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class SparkPost
1313
/**
1414
* @var string Library version, used for setting User-Agent
1515
*/
16-
private $version = '2.2.0';
16+
private $version = '2.3.0';
1717

1818
/**
1919
* @var HttpClient|HttpAsyncClient used to make requests

0 commit comments

Comments
 (0)