Skip to content

Commit e571fe6

Browse files
Apply suggestions from code review
Co-authored-by: George Steel <[email protected]> Signed-off-by: Michał Iżewski <[email protected]>
1 parent 9a76d8c commit e571fe6

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/CacheSessionPersistence.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ public function persistSession(SessionInterface $session, ResponseInterface $res
145145
// Regenerate the session if:
146146
// - we have no session identifier
147147
// - the session is marked as regenerated
148-
// - the session has changed (data is different) and autoRegenerate is turned off in the configuration
148+
// - the session has changed (data is different) and autoRegenerate is turned on (default) in the configuration
149149
if ('' === $id || $session->isRegenerated() || ($this->autoRegenerate && $session->hasChanged())) {
150150
$id = $this->regenerateSession($id);
151151
}

test/CacheSessionPersistenceIntegrationTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ public function testThatAChangedSessionWillCauseRegenerationAndASetCookieHeader(
112112
self::assertNull($value, 'The previous session data should have been deleted');
113113
}
114114

115-
public function testThatAChangedSessionWillNotCauseRegenerationAndASetCookieHeader(): void
115+
public function testThatAChangedSessionWillNotCauseRegenerationWhenAutoRegenerateIsFalse(): void
116116
{
117117
$this->storage = new CacheSessionPersistence(
118118
$this->cache,

0 commit comments

Comments
 (0)