From b4e5d45a6aa76ddc5daaafecefaf8996c67d701a Mon Sep 17 00:00:00 2001 From: Tom Knight-Markiegi Date: Fri, 31 Mar 2023 10:27:02 -0600 Subject: [PATCH 1/5] Fixed some missing/incorrect variables in README code samples --- README.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 621b223..3534938 100755 --- a/README.md +++ b/README.md @@ -446,6 +446,8 @@ class Initialize $pickListValidation = false; + $enableSSLVerification = true; + $connectionTimeout = 2; $timeout = 2; @@ -652,6 +654,8 @@ class MultiThread $pickListValidation = false; + $enableSSLVerification = true; + $connectionTimeout = 2; $timeout = 2; @@ -668,7 +672,7 @@ class MultiThread $user2 = new UserSignature("abc2@zoho.eu"); - $token2 = new OAuthToken("clientId2", "clientSecrect2", "REFRESH/GRANT token", TokenType.REFRESH/GRANT); + $token2 = new OAuthToken("clientId2", "clientSecrect2", "REFRESH/GRANT token", TokenType::REFRESH/GRANT); Initializer::switchUser($user2, $environment2, $token2, $sdkConfig); @@ -803,6 +807,8 @@ class Record $pickListValidation = false; + $enableSSLVerification = true; + $connectionTimeout = 2; $timeout = 2; From 1b78f4471a5e8cc1358f1f67954bd9eba1f611e9 Mon Sep 17 00:00:00 2001 From: Tom Knight-Markiegi Date: Fri, 31 Mar 2023 11:47:27 -0600 Subject: [PATCH 2/5] Fixed issue with paths containing 'src' --- src/com/zoho/crm/api/Initializer.php | 4 ++-- src/com/zoho/crm/api/util/HeaderParamValidator.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/com/zoho/crm/api/Initializer.php b/src/com/zoho/crm/api/Initializer.php index a7a9535..9f24fde 100755 --- a/src/com/zoho/crm/api/Initializer.php +++ b/src/com/zoho/crm/api/Initializer.php @@ -122,7 +122,7 @@ public static function initialize($user, $environment, $token, $store, $sdkConfi { if(is_null(self::$jsonDetails)) { - self::$jsonDetails = json_decode(file_get_contents(explode("src", realpath(__DIR__))[0] . Constants::JSON_DETAILS_FILE_PATH), true); + self::$jsonDetails = json_decode(file_get_contents(join("src", explode("src", realpath(__DIR__), -1)) . Constants::JSON_DETAILS_FILE_PATH), true); } } catch (\Exception $ex) @@ -352,4 +352,4 @@ public function toString() { return Constants::FOR_EMAIL_ID . self::$initializer->getUser()->getEmail() . Constants::IN_ENVIRONMENT . self::$initializer->getEnvironment()->getUrl() . "."; } -} \ No newline at end of file +} diff --git a/src/com/zoho/crm/api/util/HeaderParamValidator.php b/src/com/zoho/crm/api/util/HeaderParamValidator.php index b7fdd40..eefec5f 100644 --- a/src/com/zoho/crm/api/util/HeaderParamValidator.php +++ b/src/com/zoho/crm/api/util/HeaderParamValidator.php @@ -60,7 +60,7 @@ public function getJSONDetails() if(is_null($json_Details)) { - $json_Details = json_decode(file_get_contents(explode("src", realpath(__DIR__))[0] . Constants::JSON_DETAILS_FILE_PATH), true); + $json_Details = json_decode(file_get_contents(join("src", explode("src", realpath(__DIR__), -1)) . Constants::JSON_DETAILS_FILE_PATH), true); Initializer::$jsonDetails = $json_Details; } @@ -131,4 +131,4 @@ public function checkDataType($keyDetail, $value) return $check; } -} \ No newline at end of file +} From 5bcef244ffe4faefb28299fcc766f3a536667553 Mon Sep 17 00:00:00 2001 From: Tom Knight-Markiegi Date: Fri, 31 Mar 2023 11:49:30 -0600 Subject: [PATCH 3/5] Revert "Fixed issue with paths containing 'src'" This reverts commit 1b78f4471a5e8cc1358f1f67954bd9eba1f611e9. --- src/com/zoho/crm/api/Initializer.php | 4 ++-- src/com/zoho/crm/api/util/HeaderParamValidator.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/com/zoho/crm/api/Initializer.php b/src/com/zoho/crm/api/Initializer.php index 9f24fde..a7a9535 100755 --- a/src/com/zoho/crm/api/Initializer.php +++ b/src/com/zoho/crm/api/Initializer.php @@ -122,7 +122,7 @@ public static function initialize($user, $environment, $token, $store, $sdkConfi { if(is_null(self::$jsonDetails)) { - self::$jsonDetails = json_decode(file_get_contents(join("src", explode("src", realpath(__DIR__), -1)) . Constants::JSON_DETAILS_FILE_PATH), true); + self::$jsonDetails = json_decode(file_get_contents(explode("src", realpath(__DIR__))[0] . Constants::JSON_DETAILS_FILE_PATH), true); } } catch (\Exception $ex) @@ -352,4 +352,4 @@ public function toString() { return Constants::FOR_EMAIL_ID . self::$initializer->getUser()->getEmail() . Constants::IN_ENVIRONMENT . self::$initializer->getEnvironment()->getUrl() . "."; } -} +} \ No newline at end of file diff --git a/src/com/zoho/crm/api/util/HeaderParamValidator.php b/src/com/zoho/crm/api/util/HeaderParamValidator.php index eefec5f..b7fdd40 100644 --- a/src/com/zoho/crm/api/util/HeaderParamValidator.php +++ b/src/com/zoho/crm/api/util/HeaderParamValidator.php @@ -60,7 +60,7 @@ public function getJSONDetails() if(is_null($json_Details)) { - $json_Details = json_decode(file_get_contents(join("src", explode("src", realpath(__DIR__), -1)) . Constants::JSON_DETAILS_FILE_PATH), true); + $json_Details = json_decode(file_get_contents(explode("src", realpath(__DIR__))[0] . Constants::JSON_DETAILS_FILE_PATH), true); Initializer::$jsonDetails = $json_Details; } @@ -131,4 +131,4 @@ public function checkDataType($keyDetail, $value) return $check; } -} +} \ No newline at end of file From d03d852c2ff0dda2ff973905f5e42570b2ea13b3 Mon Sep 17 00:00:00 2001 From: Tom Knight-Markiegi Date: Fri, 31 Mar 2023 11:53:16 -0600 Subject: [PATCH 4/5] Revert "Fixed some missing/incorrect variables in README code samples" This reverts commit b4e5d45a6aa76ddc5daaafecefaf8996c67d701a. --- README.md | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/README.md b/README.md index 3534938..621b223 100755 --- a/README.md +++ b/README.md @@ -446,8 +446,6 @@ class Initialize $pickListValidation = false; - $enableSSLVerification = true; - $connectionTimeout = 2; $timeout = 2; @@ -654,8 +652,6 @@ class MultiThread $pickListValidation = false; - $enableSSLVerification = true; - $connectionTimeout = 2; $timeout = 2; @@ -672,7 +668,7 @@ class MultiThread $user2 = new UserSignature("abc2@zoho.eu"); - $token2 = new OAuthToken("clientId2", "clientSecrect2", "REFRESH/GRANT token", TokenType::REFRESH/GRANT); + $token2 = new OAuthToken("clientId2", "clientSecrect2", "REFRESH/GRANT token", TokenType.REFRESH/GRANT); Initializer::switchUser($user2, $environment2, $token2, $sdkConfig); @@ -807,8 +803,6 @@ class Record $pickListValidation = false; - $enableSSLVerification = true; - $connectionTimeout = 2; $timeout = 2; From 871b49132526a6371704c7d9e669a52986de87c1 Mon Sep 17 00:00:00 2001 From: Tom Knight-Markiegi Date: Fri, 31 Mar 2023 12:02:33 -0600 Subject: [PATCH 5/5] Fixed issue with paths containing 'src' --- src/com/zoho/crm/api/Initializer.php | 4 ++-- src/com/zoho/crm/api/util/HeaderParamValidator.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/com/zoho/crm/api/Initializer.php b/src/com/zoho/crm/api/Initializer.php index a7a9535..9f24fde 100755 --- a/src/com/zoho/crm/api/Initializer.php +++ b/src/com/zoho/crm/api/Initializer.php @@ -122,7 +122,7 @@ public static function initialize($user, $environment, $token, $store, $sdkConfi { if(is_null(self::$jsonDetails)) { - self::$jsonDetails = json_decode(file_get_contents(explode("src", realpath(__DIR__))[0] . Constants::JSON_DETAILS_FILE_PATH), true); + self::$jsonDetails = json_decode(file_get_contents(join("src", explode("src", realpath(__DIR__), -1)) . Constants::JSON_DETAILS_FILE_PATH), true); } } catch (\Exception $ex) @@ -352,4 +352,4 @@ public function toString() { return Constants::FOR_EMAIL_ID . self::$initializer->getUser()->getEmail() . Constants::IN_ENVIRONMENT . self::$initializer->getEnvironment()->getUrl() . "."; } -} \ No newline at end of file +} diff --git a/src/com/zoho/crm/api/util/HeaderParamValidator.php b/src/com/zoho/crm/api/util/HeaderParamValidator.php index b7fdd40..eefec5f 100644 --- a/src/com/zoho/crm/api/util/HeaderParamValidator.php +++ b/src/com/zoho/crm/api/util/HeaderParamValidator.php @@ -60,7 +60,7 @@ public function getJSONDetails() if(is_null($json_Details)) { - $json_Details = json_decode(file_get_contents(explode("src", realpath(__DIR__))[0] . Constants::JSON_DETAILS_FILE_PATH), true); + $json_Details = json_decode(file_get_contents(join("src", explode("src", realpath(__DIR__), -1)) . Constants::JSON_DETAILS_FILE_PATH), true); Initializer::$jsonDetails = $json_Details; } @@ -131,4 +131,4 @@ public function checkDataType($keyDetail, $value) return $check; } -} \ No newline at end of file +}