Skip to content

Commit 965ba68

Browse files
committed
Do not forcibly regenerate the session when session data changes
This is the responsibility of upper layers. Closes: mezzio#43 Signed-off-by: Roel van Meer <[email protected]>
1 parent e50ab7e commit 965ba68

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/CacheSessionPersistence.php

+1-2
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,7 @@ public function persistSession(SessionInterface $session, ResponseInterface $res
139139
// Regenerate the session if:
140140
// - we have no session identifier
141141
// - the session is marked as regenerated
142-
// - the session has changed (data is different)
143-
if ('' === $id || $session->isRegenerated() || $session->hasChanged()) {
142+
if ('' === $id || $session->isRegenerated()) {
144143
$id = $this->regenerateSession($id);
145144
}
146145

0 commit comments

Comments
 (0)