diff --git a/src/Server/Session/Session.php b/src/Server/Session/Session.php index 6bf3c30..e02fcc7 100644 --- a/src/Server/Session/Session.php +++ b/src/Server/Session/Session.php @@ -51,9 +51,9 @@ public function getStore(): SessionStoreInterface return $this->store; } - public function save(): void + public function save(): bool { - $this->store->write($this->id, json_encode($this->data, \JSON_THROW_ON_ERROR)); + return $this->store->write($this->id, json_encode($this->data, \JSON_THROW_ON_ERROR)); } public function get(string $key, mixed $default = null): mixed diff --git a/src/Server/Session/SessionInterface.php b/src/Server/Session/SessionInterface.php index 9ee5e80..8f93a6e 100644 --- a/src/Server/Session/SessionInterface.php +++ b/src/Server/Session/SessionInterface.php @@ -26,7 +26,7 @@ public function getId(): Uuid; /** * Save the session. */ - public function save(): void; + public function save(): bool; /** * Get a specific attribute from the session.