diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 8b0759f7a6..a9154651cf 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -24,7 +24,7 @@ jobs: tests-linux: name: Tests (Linux, PHP ${{ matrix.php-versions }}) runs-on: ubuntu-latest - continue-on-error: false + continue-on-error: ${{ matrix.experimental || false }} strategy: fail-fast: false matrix: @@ -33,6 +33,8 @@ jobs: - php-versions: "8.3" - php-versions: "8.4" - php-versions: "8.5" + - php-versions: "8.6" + experimental: true env: GOMAXPROCS: 10 LIBRARY_PATH: ${{ github.workspace }}/watcher/target/lib diff --git a/testdata/session-handler.php b/testdata/session-handler.php index ba518c13d2..1671bf2a72 100644 --- a/testdata/session-handler.php +++ b/testdata/session-handler.php @@ -3,7 +3,7 @@ require_once __DIR__.'/_executor.php'; // Custom session handler class -class TestSessionHandler implements SessionHandlerInterface +class TestSessionHandler implements SessionHandlerInterface, SessionIdInterface, SessionUpdateTimestampHandlerInterface { private static array $data = []; @@ -38,6 +38,23 @@ public function gc(int $max_lifetime): int|false { return 0; } + + public function create_sid(): string + { + return bin2hex(random_bytes(16)); + } + + public function validateId(string $id): bool + { + // session.use_strict_mode is off in these tests: accept any id, as + // PHP did before 8.6 deprecated handlers without this method + return true; + } + + public function updateTimestamp(string $id, string $data): bool + { + return true; + } } return function () { diff --git a/testdata/session_deadlock.php b/testdata/session_deadlock.php index 4407e79345..393999795b 100644 --- a/testdata/session_deadlock.php +++ b/testdata/session_deadlock.php @@ -4,7 +4,7 @@ // Self-contained repro of https://github.com/php/frankenphp/issues/2368 if (!class_exists('StrictSessionHandler', false)) { - abstract class AbstractSessionHandler implements SessionHandlerInterface, SessionUpdateTimestampHandlerInterface + abstract class AbstractSessionHandler implements SessionHandlerInterface, SessionIdInterface, SessionUpdateTimestampHandlerInterface { private string $sessionName; private string $prefetchId; @@ -21,6 +21,11 @@ abstract protected function doRead(string $sessionId): string; abstract protected function doWrite(string $sessionId, string $data): bool; abstract protected function doDestroy(string $sessionId): bool; + public function create_sid(): string + { + return bin2hex(random_bytes(16)); + } + public function validateId(string $sessionId): bool { $this->prefetchData = $this->read($sessionId); diff --git a/testdata/worker-with-session-handler.php b/testdata/worker-with-session-handler.php index 218c54769e..ad7d66a238 100644 --- a/testdata/worker-with-session-handler.php +++ b/testdata/worker-with-session-handler.php @@ -1,7 +1,7 @@