Skip to content

Commit 42baffd

Browse files
Add note about session behavior change in UPGRADE file (#21271)
1 parent 5f87a6e commit 42baffd

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

UPGRADING

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,14 @@ PHP 8.6 UPGRADE NOTES
3030
sessions. It only returns false now when the session data could not be
3131
encoded. This mainly happens with the default serialization handler
3232
if a key contains the pipe | character.
33+
. When session.lazy_write is enabled and a session handler implements
34+
SessionUpdateTimestampHandlerInterface, sessions that were read as empty
35+
and remain empty at write time will now trigger updateTimestamp() instead
36+
of write(). Previously, write() was always called for empty sessions
37+
because session_encode() returned false, bypassing the lazy_write
38+
comparison. Custom session handlers that rely on write() being called
39+
with empty data (e.g. to destroy the session) should implement the same
40+
logic in their updateTimestamp() method.
3341

3442
- Standard:
3543
. Invalid mode values now throw in array_filter() instead of being silently

0 commit comments

Comments
 (0)