This repository has been archived by the owner on Jun 2, 2020. It is now read-only.
[4.2.0] - 2019-06-12 (Enhancements Release)
This release has a number of [no-backward-compatibility] flags. But these incompatible changes related
only to the "under the hood" files. It means, if you operate only with high-level instances, like
Connector
and Rest\
/Checkout/Payments/OrderManagement/etc
resources (you have the code,
like in the example files) - you are safe for upgrade.
If you have your own implementation of REST API Services, HTTP Transport or Base Resource instance,
you need to check the code before go live.
Changed
- Decouple the HTTP Transport Connector interface. Remove Guzzle hardcoded dependency [no-backward-compatibility]
- Decouple
ConnectorException
. Remove Guzzle hardcoded dependency [partial-backward-compatibility]- Change the constructor signature. Replace
RequestException
exception withint $code
getResponse
method is not longer return GuzzleResponseInterface
.
This method marked as deprecated and returnnull
- Change the constructor signature. Replace
- Rename
Klarna/Rest/Transport/Connector.php
toKlarna/Rest/Transport/GuzzleConnector.php
to
make the name explicit. [backward-compatible]
TheKlarna/Rest/Transport/Connector.php
still exists, but marked as deprecated - Change the structure and return values for all the methods in
GuzzleConnector
(exConnector
)
to follow the new Connector interface. [no-backward-compatibility] - The exception throwing behavior: [partial-backward-compatibility]
GuzzleConnector
(exConnector
) not longer throws Guzzle relatedRuntimeException
exceptions.
The Connector throws onlyRuntimeException
- The only two types of exceptions can be thrown by SDK now:
RuntimeException
ConnectorException
Added
- Add new HTTP Transport
CURLTransport
. This transport does not require any package dependencies - Add PHP SDK SPL Autoloader
- Add
ApiResponse
class to unify an HTTP Transport reponse - Extend
ResponseValidator
withexpectSuccessfull
andisSuccessfull
methods. The methods allows
to validate the reponse code and parse the Klarna Error Message if possible