Skip to content

Commit

Permalink
20.4.0 MND-2430 M2.4.4 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
wsajosh committed May 13, 2022
1 parent 3ec256a commit 10fc557
Show file tree
Hide file tree
Showing 8 changed files with 50 additions and 40 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG-PUBLIC.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,7 @@ RIV-443 update get methods for serializer
RIV-898 Adds missing coupon code field


## 20.4.0 (2022-05-13)
MND-2430 M2.4.4 compatibility


4 changes: 4 additions & 0 deletions CHANGELOG.MD
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,7 @@ RIV-443 update get methods for serializer
RIV-898 Adds missing coupon code field


## 20.4.0 (2022-05-13)
MND-2430 M2.4.4 compatibility


66 changes: 34 additions & 32 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,36 +1,38 @@
{
"name": "shipperhq/library-graphql",
"description": "ShipperHQ GraphQL Library",
"type": "magento2-library",
"version": "20.3.0",
"license": [
"OSL-3.0",
"AFL-3.0"
],
"authors": [
{
"name": "ShipperHQ",
"email": "sales@shipperhq.com",
"homepage": "http://www.Shipperhq.com"
},
{
"name": "Zowta LLC"
}
],
"require": {
"php": "~7.1",
"zendframework/zend-http": "~2.0",
"netresearch/jsonmapper": "~1.4"
},
"support": {
"documentation": "http://docs.shipperhq.com"
},
"autoload": {
"files": [
"src/registration.php"
"name": "shipperhq/library-graphql",
"description": "ShipperHQ GraphQL Library",
"type": "magento2-library",
"version": "20.4.0",
"license": [
"OSL-3.0",
"AFL-3.0"
],
"authors": [
{
"name": "ShipperHQ",
"email": "sales@shipperhq.com",
"homepage": "http://www.Shipperhq.com"
},
{
"name": "Zowta LLC"
}
],
"psr-4": {
"ShipperHQ\\GraphQL\\": "src/"
"require": {
"php": "~7.1 || ~8.1",
"laminas/laminas-http": "~2.0",
"netresearch/jsonmapper": "^4.0",
"laminas/laminas-dependency-plugin": "^2.1",
"ext-json": "*"
},
"support": {
"documentation": "http://docs.shipperhq.com"
},
"autoload": {
"files": [
"src/registration.php"
],
"psr-4": {
"ShipperHQ\\GraphQL\\": "src/"
}
}
}
}
2 changes: 1 addition & 1 deletion src/Client/PostorderClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public function createListing($listingInfo, $endpoint, $timeout, SecureHeaders $
* @return array
*/
private function filterImageFromDebuggingData($response) {
$debugRequestString = $response['debug']['request'];
$debugRequestString = (string) $response['debug']['request'];

$response['debug']['request'] = preg_replace("/(\"image\"\s*:\s*\")(.{1,10})(.*?)\"/m", "$1$2...\"", $debugRequestString);

Expand Down
4 changes: 2 additions & 2 deletions src/Helpers/LoggingHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public function prepAuthResponseForLogging(array $tokenResult)
private function sanitizeAuthCode($debugResult)
{
if (isset($debugResult['request'])) {
$debugResult['request'] = json_decode($debugResult['request'], true);
$debugResult['request'] = json_decode((string) $debugResult['request'], true);
if (isset($debugResult['request']['variables']['auth_code'])) {
$debugResult['request']['variables']['auth_code'] = 'SANITIZED';
}
Expand All @@ -47,7 +47,7 @@ private function sanitizeAuthCode($debugResult)
private function sanitizeAuthToken($debugResult)
{
if (isset($debugResult['response'])) {
$debugResult['response'] = json_decode($debugResult['response'], true);
$debugResult['response'] = json_decode((string) $debugResult['response'], true);
if (isset($debugResult['response']['data']['createSecretToken']['token'])) {
$debugResult['response']['data']['createSecretToken']['token'] = 'SANITIZED';
}
Expand Down
2 changes: 1 addition & 1 deletion src/Helpers/Serializer.php
Original file line number Diff line number Diff line change
Expand Up @@ -215,4 +215,4 @@ private static function getPropertyTree($fromObject)
}
return $mappedObject;
}
}
}
4 changes: 2 additions & 2 deletions src/Types/Input/RMSItem.php
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ public function getType()
*/
public function setType($type)
{
$type = strtoupper($type);
$type = strtoupper((string) $type);

if (in_array($type, self::AVAILABLE_ITEM_TYPES)) {
$this->type = $type;
Expand Down Expand Up @@ -528,4 +528,4 @@ public function setItems($items)
$this->items = $items;
return $this;
}
}
}
4 changes: 2 additions & 2 deletions src/Types/Input/RMSRatingInfo.php
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ public function getCartType()
*/
public function setCartType($cartType)
{
$cartType = strtoupper($cartType);
$cartType = strtoupper((string) $cartType);

if (in_array($cartType, self::AVAILABLE_CART_TYPES)) {
$this->cartType = $cartType;
Expand Down Expand Up @@ -192,4 +192,4 @@ public function setSiteDetails($siteDetails)
$this->siteDetails = $siteDetails;
}

}
}

0 comments on commit 10fc557

Please sign in to comment.