Skip to content

Extended legacy support, simpler integration.

Choose a tag to compare

@Howard3 Howard3 released this 21 Mar 08:52
· 50 commits to master since this release

php-lenddo v2.0 Introduction

This upgrade marks a significant upgrade to the core to allow further compatibility with more systems despite their configuration. We're no longer just compatible with PHP >=5.5 or Guzzle 6.

We're now compatible down to PHP 5.3, and Guzzle versions 3, 4, 5, and 6.

The new PHP SDK Release has a major version bump due to some backward compatibility breaking changing which will be detailed below. We highly recommend upgrading your version to 2.0, please reach out to Lenddo should you require assistance doing so. You can begin at the Backward Compatibility Breaks section attached to this release notice.

Enhanced Documentation

The documentation has now been segmented and enhanced now that it's grown to a significant size. This move is to make the documentation easier to digest. Take a Look

Certificate Authority Inclusion

To alleviate some issues with SSL Certs not always being available on target machines we're now including the certificate authority bundle provided by Mozilla. This can be found here: https://curl.haxx.se/ca/cacert.pem

Backward Compatibility Breaks

Previously the response of the REST clients would be a GuzzleHTTP Response Object. This is still available to you but it's nested within a response handler. This change was necessary since we now support many versions going back to Guzzle version 3.

The change is favorable however since you will no longer need to extended chaining introduced by Guzzle to get the data you really want.

We've abstracted the response object by using a interface-bound classes which exposes the following functions:

  • getBody( $parsed = true )
  • getStatusCode()
  • guzzleResponse()
  • guzzleRequest()

The primary changes here being the object which is returned and the body parsing.

Body Parsing

If you were using the old method of json_decode($response->getBody()->getContents()); you can now simply perform a $response->getBody(); call instead. If you do not want the body to be parsed, simply do the following: $response->getBody(false)

Take a look at the Service Client and Whitelabel client documentations to see how the code should look with v2.0.

Accessing the response object

The object which was previously returned as $response is now returned as $response->guzzleResponse()