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", 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); + } }