Releases: postalserver/postal-php
Releases · postalserver/postal-php
v2.0.2
Fix the raw endpoint not working properly at all.
What's Changed
- Refactor for RawMessage and endpoint correction by @craigrileyuk in #19
New Contributors
- @craigrileyuk made their first contribution in #19
Full Changelog: v2.0.1...v2.0.2
v2.0.1
A bugfix release to correct behaviour around throwing exceptions when provided with a specific error code from Postal.
Full Changelog: v2.0.0...v2.0.1
v2.0.0
A full rewrite to rely on the more common Guzzle client and apply tests. The minimum PHP version has been changed to 7.4.
This is not backwards compatible and you will need to change your code to use this new version
For sending a message, the changes are mostly as follows, from
use Postal\SendMessage;
$postalmessage = new SendMessage($client);
$response = $postalmessage->send();
$postal_email_id = $response->result->message_id;
foreach ($response->recipients() as $address => $message) {
$postal_id = $message->id();
$postal_token = $message->token();
}
to
use Postal\Send\Message as SendMessage;
$postalmessage = new SendMessage();
$response = $client->send->message($postalmessage);
$postal_email_id = $response->message_id;
foreach ($response->recipients() as $address => $message) {
$postal_id = $message->id;
$postal_token = $message->token;
}
However you should take a moment to have a look at 027a340 for the full details.
Kudos to @Josh-G for all the hard work here.
v1.0.1
Lock rmccue/requests at v1 to avoid installing v2 which has changed namespaces for PSR reasons.