From e2a7a8d6084cc1aa9a7985438e70cf5493a58f0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Dunglas?= Date: Wed, 4 Nov 2026 21:47:44 +0100 Subject: [PATCH] test: implement all session handler interfaces in the cross-request test PHP 8.6 deprecates passing session_set_save_handler() an object without create_sid() and validateId(). The deprecation notices went into the response and broke TestPreviousRequestCodeDoesNotWriteToNextClient_worker. Implement SessionIdInterface and SessionUpdateTimestampHandlerInterface, like the other test session handlers. --- testdata/worker-cross-request-output.php | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/testdata/worker-cross-request-output.php b/testdata/worker-cross-request-output.php index 21383ffada..a24524588f 100644 --- a/testdata/worker-cross-request-output.php +++ b/testdata/worker-cross-request-output.php @@ -42,7 +42,7 @@ public function __destruct() } } -final class TenantSessionHandler implements SessionHandlerInterface +final class TenantSessionHandler implements SessionHandlerInterface, SessionIdInterface, SessionUpdateTimestampHandlerInterface { public function open(string $path, string $name): bool { @@ -75,6 +75,21 @@ public function gc(int $max_lifetime): int { return 0; } + + public function create_sid(): string + { + return bin2hex(random_bytes(16)); + } + + public function validateId(string $id): bool + { + return true; + } + + public function updateTimestamp(string $id, string $data): bool + { + return true; + } } $between = null;