From 4ffd06480c741866a674542a8c893ec4e3aed3af Mon Sep 17 00:00:00 2001 From: Michelle-932 Date: Thu, 4 Dec 2025 09:52:55 -0600 Subject: [PATCH 1/3] changed v39 to v63 --- src/CRUD.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/CRUD.php b/src/CRUD.php index 4665974..b942085 100644 --- a/src/CRUD.php +++ b/src/CRUD.php @@ -22,7 +22,7 @@ public function __construct() public function query($query) { - $url = "{$this->instance_url}/services/data/v39.0/query"; + $url = "{$this->instance_url}/services/data/v63.0/query"; $client = new Client(); $request = $client->request('GET', $url, [ From a32f3b5e9d46d6d6354a011a9ecf9bde1c0376a5 Mon Sep 17 00:00:00 2001 From: Michelle-932 Date: Thu, 4 Dec 2025 10:43:40 -0600 Subject: [PATCH 2/3] changed v39 to v63 --- src/CRUD.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/CRUD.php b/src/CRUD.php index b942085..a0ebf2c 100644 --- a/src/CRUD.php +++ b/src/CRUD.php @@ -39,7 +39,7 @@ public function query($query) public function create($object, array $data) { - $url = "{$this->instance_url}/services/data/v39.0/sobjects/{$object}/"; + $url = "{$this->instance_url}/services/data/v63.0/sobjects/{$object}/"; $client = new Client(); @@ -68,7 +68,7 @@ public function create($object, array $data) public function update($object, $id, array $data) { - $url = "{$this->instance_url}/services/data/v39.0/sobjects/{$object}/{$id}"; + $url = "{$this->instance_url}/services/data/v63.0/sobjects/{$object}/{$id}"; $client = new Client(); @@ -93,7 +93,7 @@ public function update($object, $id, array $data) public function upsert($object, $field, $id, array $data) { - $url = "{$this->instance_url}/services/data/v39.0/sobjects/{$object}/{$field}/{$id}"; + $url = "{$this->instance_url}/services/data/v63.0/sobjects/{$object}/{$field}/{$id}"; $client = new Client(); @@ -118,7 +118,7 @@ public function upsert($object, $field, $id, array $data) public function delete($object, $id) { - $url = "{$this->instance_url}/services/data/v39.0/sobjects/{$object}/{$id}"; + $url = "{$this->instance_url}/services/data/v63.0/sobjects/{$object}/{$id}"; $client = new Client(); $request = $client->request('DELETE', $url, [ From 77dd99d2d64ebb2187a3642170fc4e4a1438042e Mon Sep 17 00:00:00 2001 From: Michelle-932 Date: Tue, 9 Dec 2025 10:33:59 -0600 Subject: [PATCH 3/3] updated client timeouts --- composer.json | 2 +- src/CRUD.php | 26 ++++++++++++++++++++------ 2 files changed, 21 insertions(+), 7 deletions(-) diff --git a/composer.json b/composer.json index e2c5b2f..7f0ee97 100644 --- a/composer.json +++ b/composer.json @@ -17,7 +17,7 @@ ], "require": { "guzzlehttp/guzzle": "^6.2 || ^7", - "php": ">=5.5" + "php": ">=8.0" }, "autoload": { "psr-4": { diff --git a/src/CRUD.php b/src/CRUD.php index a0ebf2c..9824a88 100644 --- a/src/CRUD.php +++ b/src/CRUD.php @@ -24,7 +24,10 @@ public function query($query) { $url = "{$this->instance_url}/services/data/v63.0/query"; - $client = new Client(); + $client = new Client([ + 'timeout' => 10, + 'connect_timeout' => 5, + ]); $request = $client->request('GET', $url, [ 'headers' => [ 'Authorization' => "OAuth {$this->access_token}" @@ -41,7 +44,10 @@ public function create($object, array $data) { $url = "{$this->instance_url}/services/data/v63.0/sobjects/{$object}/"; - $client = new Client(); + $client = new Client([ + 'timeout' => 10, + 'connect_timeout' => 5, + ]); $request = $client->request('POST', $url, [ 'headers' => [ @@ -70,7 +76,10 @@ public function update($object, $id, array $data) { $url = "{$this->instance_url}/services/data/v63.0/sobjects/{$object}/{$id}"; - $client = new Client(); + $client = new Client([ + 'timeout' => 10, + 'connect_timeout' => 5, + ]); $request = $client->request('PATCH', $url, [ 'headers' => [ @@ -95,8 +104,10 @@ public function upsert($object, $field, $id, array $data) { $url = "{$this->instance_url}/services/data/v63.0/sobjects/{$object}/{$field}/{$id}"; - $client = new Client(); - + $client = new Client([ + 'timeout' => 10, + 'connect_timeout' => 5, + ]); $request = $client->request('PATCH', $url, [ 'headers' => [ 'Authorization' => "OAuth {$this->access_token}", @@ -120,7 +131,10 @@ public function delete($object, $id) { $url = "{$this->instance_url}/services/data/v63.0/sobjects/{$object}/{$id}"; - $client = new Client(); + $client = new Client([ + 'timeout' => 10, + 'connect_timeout' => 5, + ]); $request = $client->request('DELETE', $url, [ 'headers' => [ 'Authorization' => "OAuth {$this->access_token}",