From e4ca2405e189db333e787b485702ff55d2e7f6de Mon Sep 17 00:00:00 2001 From: soyuka Date: Tue, 4 Nov 2025 11:18:38 +0100 Subject: [PATCH] session save return type --- src/Server/Session/Session.php | 4 ++-- src/Server/Session/SessionInterface.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Server/Session/Session.php b/src/Server/Session/Session.php index 6bf3c306..e02fcc7c 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 9ee5e807..8f93a6e4 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.