Releases: shopgate/cart-integration-sdk
Shopgate Cart Integration SDK version 2.10.3
2.10.3 - 2024-02-23
Fixed
- handle zero length files properly in
ShopateMobileRedirect::loadKeywordsFromFile()
Shopgate Cart Integration SDK version 2.10.2
2.10.2 - 2023-10-16
Fixed
- remove PHP notices from array access on a boolean in some cases when calling the
ping
action
Changed
- all UID fields of models and fields referring to UID fields of other models are now type-hinted to strings in PHPDoc
Shopgate Cart Integration SDK version 2.10.1
2.10.1 - 2023-05-22
WARNING This release may have breaking changes if classes ShopgatePluginApi
or any of the ShopgatePluginApiResponse
classes are used directly. The regular "SDK way" of writing a plugin, as shown in the examples, remains unaffected.
NOTE Enabling external_response_handling
changes the way ShopgatePlugin::handleRequest()
works:
handleRequest()
will return aShopgatePluginApiResponse
object- no headers will be sent, no content flushed, except for export file paths that are PHP I/O streams (
php://output
) - use
ShopgatePluginApiResponse::getHeaders()
and::getBody()
to get response content - use
ShopgatePluginApiResponse::send()
to send headers and flush response data - previously, some response implementations stopped script execution after flushing; this has been removed
Added
- configuration setting
external_response_handling
(bool) ShopgatePluginApiResponse::getHeaders()
and::getBody()
ShopgatePluginApiResponseExport::isStream()
- true when the file path is an I/O stream
Changed
- when the new setting is active,
ShopgatePlugin::handleRequest()
will return theShopgatePluginApiResponse
object - moved classes
ShopgatePluginApi
,ShopgatePluginApiResponse*
and interfaceShopgatePluginApiInterface
out of
src/apis.php
into separate files undersrc/plugin_api
- integration tests are now also run on CI
Removed
- the fifth argument (
ShopgatePluginApiResponse $response = null
) fromShopgatePluginApi::__construct()
- stopping script execution on some response types after flushing
Fixed
- PHP 8: deprecation warning on preg_replace() arguments
- PHP 8: error when calling filesize() on an i/o stream
Shopgate Cart Integration SDK version 2.10.1-beta.2
v2.10.1-beta.2
Shopgate Cart Integration SDK version 2.9.91
2.9.91 - 2023-04-04
Added
- support for gender selection "d" (diverse) in get_customer, register_customer, check_cart, get_orders, add_order and update_order
Shopgate Cart Integration SDK version 2.9.90
2.9.90 - 2022-09-28
Added
- class
ShopgateExternalOrderExternalCoupon
, representing external coupons in the get_orders documentation - configuration setting
external_exception_handling
with possible valuescatch
(default),log
ornone
1
Fixed
- detection of ISO-8859-1 compatible strings as UTF-16LE, leading to them becoming strings with Japanese characters after conversion to UTF-8
Changed
ShopgateExternalOrder::setExternalCoupons()
now takes a list ofShopgateExternalOrderExternalCoupon
objects;ShopgateExternalCoupon
will still work but is deprecated- the
force_source_encoding
flag is now set to true by default, assuming the source encoding to be UTF-8 and effectively disabling auto-detection 2 - removed UTF-16LE from the list of possible source encodings 2
Footnotes
-
The new setting should not be user-configurable but be overridden hard-coded by plugins that use their own error handling.
It applies only to non-SDK exceptions (i.e. non-ShopgateLibraryException
, non-ShopgateMerchantApiException
).
Possible values explained:catch
(default) - catch uncaught exceptions and transform them to an API responselog
- log uncaught exceptions and then throw them further upnone
- no handling at all, exceptions just bubble through all the way
-
These changes were made after a change in PHP 8.1's
mb_string
library made auto-detection work differently.
The assumed source encoding can be set via theencoding
setting of the SDK if you need something different from UTF-8.
If you need auto-detection back, setforce_source_encoding
back to0
/false
. ↩ ↩2
Shopgate Cart Integration SDK version 2.9.89
2.9.89 - 2022-04-12
Fixed
- setting an invoice or delivery address of
null
on aShopgateCartBase
object results in a fatal PHP error
Shopgate Cart Integration SDK version 2.9.88
2.9.88 - 2022-03-21
Fixed
- delivery address set to invoice address on
ShopgateExternalOrder
instances
Shopgate Cart Integration SDK version 2.9.87
2.9.87 - 2022-03-17
Fixed
- setters of
ShopgateContainer
classes setting properties tonull
if they're single subtypes and an object of the required type was passed
Added
- debug logging when error file cannot be created or is not writable in
ShopgateBuilder::enableErrorHandler
ShopgateBuilder::enableErrorHandler
now takes a second argument$enableLogToFile
, defaults totrue
; iffalse
,
no error log file is trying to be created and no file path will be set to PHP'serror_log
setting
Shopgate Cart Integration SDK version 2.9.86
2.9.86 - 2022-03-08
Fixed
- several warnings and notices and deprecation notices that popped up when using PHP 8.x