Skip to content

Commit 3ac5eee

Browse files
committed
added MIGRATION.md
1 parent 6adb897 commit 3ac5eee

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

MIGRATION.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Migration Guide
2+
3+
This is a guide to help you make the switch when the SparkPost PHP library changes major versions.
4+
5+
## Migrating from 1.0 to 2.0
6+
7+
## Package name change
8+
The composer package name has changed from `sparkpost/php-sparkpost` to `sparkpost/sparkpost`
9+
10+
### No more setupUnwrapped
11+
We replaced the idea of 'wrapping' API resources with a simple `request` function. To see it in action, check out this [example](https://github.com/SparkPost/php-sparkpost/tree/2.0.0#send-an-api-call-using-the-base-request-function).
12+
13+
### `transmission` becomes `transmissions`
14+
Transmission endpoints are now under `$sparky->transmissions` instead of `$sparky->transmission` to map more directly to the [API docs](https://developers.sparkpost.com/api/).
15+
16+
* We no longer map parameters to the API - we simplified. Instead custom mapping, now set the payload to match the API docs.
17+
* The exceptions to the previous statement are `cc` and `bcc`. They are helpers to make it easier to add cc and bcc recipients. [Example](https://github.com/SparkPost/php-sparkpost/tree/2.0.0#send-an-email-using-the-transmissions-endpoint)
18+
19+
### Switched from Ivory Http Adapter to HTTPlug
20+
Ivory Http Adapter was deprecated in favor fo HTTPlug.
21+
22+
### Asynchronous support
23+
We addeded in support for [asynchronous calls](https://github.com/SparkPost/php-sparkpost/tree/2.0.0#asynchronous) (assuming your client supports it).

0 commit comments

Comments
 (0)