Upgrade to 3.5.1

This commit is contained in:
Bastian Allgeier
2021-01-19 12:20:38 +01:00
parent 8f55019e01
commit 99c36fa137
119 changed files with 2973 additions and 3707 deletions

View File

@@ -335,6 +335,10 @@ class Session
public function commit()
{
// nothing to do if nothing changed or the session has been just created or destroyed
/**
* @todo The $this->destroyed check gets flagged by Psalm for unknown reasons
* @psalm-suppress ParadoxicalCondition
*/
if ($this->writeMode !== true || $this->tokenExpiry === null || $this->destroyed === true) {
return;
}
@@ -515,12 +519,20 @@ class Session
// using $session->ensureToken() -> lazy session creation
// - destroyed sessions are never written to
// - no need to lock and re-init if we are already in write mode
/**
* @todo The $this->destroyed check gets flagged by Psalm for unknown reasons
* @psalm-suppress ParadoxicalCondition
*/
if ($this->tokenExpiry === null || $this->destroyed === true || $this->writeMode === true) {
return;
}
// don't allow writing for read-only sessions
// (only the case for moved sessions)
/**
* @todo This check gets flagged by Psalm for unknown reasons
* @psalm-suppress ParadoxicalCondition
*/
if ($this->tokenKey === null) {
throw new LogicException([
'key' => 'session.readonly',