Releases: resumeblaze/sdk-php
v2.0.5
Using PHP8.3 with PHP-SDK from Authorize.net leads to several deprecation notices:
Calling get_class() without arguments is deprecated
There are several locations in the SDK that this declaration is made $classDetails = $mapper->getClass(get_class() , $key);
Simply updating the get_class()
to get_class($this)
will resolve the deprecation notice. These changes have been made to v2.0.5 and the SDK is now compatible with PHP8.3.
You can see the differences at 2df164fea58e91a956e744553e8e129d6be39f4c
v2.0.4
This release allows a user to integrate the Authorize.net PHP-SDK with PHP8.2. There was a minor issue that was required to suppress warnings. The variable, $sensitiveStringRegexes, was declared dynamically.
/authorizenet/lib/net/authorize/util/Log.php:366
Creation of dynamic property net\authorize\util\Log::$sensitiveStringRegexes is deprecated
This release adds the missing declaration on sdk-php/lib/net/authorize/util/Log.php on line 34 .
private $sensitiveStringRegexes = NULL;
Suppress JsonSerializable Notice
Deprecated [description] => Return type of net\authorize\api\contract\v1\MerchantAuthenticationType::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice
Simply replaces public function jsonSerialize(){
in all files. There are 178 deletions and 528 additions. This is not an official patch, but it will suppress the warning notices.
#[\ReturnTypeWillChange]
public function jsonSerialize(): mixed
{