From 15f615972a058db0e2ab77d3312a543446d99fb3 Mon Sep 17 00:00:00 2001 From: Eric Guerin Date: Wed, 15 Nov 2023 14:17:25 -0800 Subject: [PATCH 1/2] Update composer.json to support guzzle 7 --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 83cd856..0ca72b1 100644 --- a/composer.json +++ b/composer.json @@ -4,7 +4,7 @@ "description": "Php HTTP client library for Classy API", "version": "1.2.0", "require": { - "guzzlehttp/guzzle": "^6.2" + "guzzlehttp/guzzle": "^7.0" }, "require-dev": { "phpunit/phpunit": "~4.0", From 867232d20f93a97ea9ab68e9fa53633ac01441a1 Mon Sep 17 00:00:00 2001 From: Eric Guerin Date: Wed, 15 Nov 2023 17:05:04 -0800 Subject: [PATCH 2/2] Fix serialization warnings. --- src/Session.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/Session.php b/src/Session.php index d8a3700..5bf3016 100644 --- a/src/Session.php +++ b/src/Session.php @@ -5,7 +5,7 @@ use Classy\Exceptions\SDKException; use DateTime; -Class Session implements \Serializable +Class Session { /** * @var string @@ -108,4 +108,12 @@ public function unserialize($serialized) $this->$key = $value; } } + + public function __serialize() { + return $this->serialize(get_object_vars($this)); + } + + public function __unserialize(array $data): void { + $this->unserialize($data); + } }