Skip to content

Commit

Permalink
Revert "Revert "Make sure session is saved after changing (#1573)" (#…
Browse files Browse the repository at this point in the history
…1574)" (#1591)

This reverts commit 4355550.
  • Loading branch information
barryvdh authored Apr 1, 2024
1 parent 7720538 commit aa9f65b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/SymfonyHttpDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ public function isSessionStarted()
public function setSessionValue($name, $value)
{
$this->session->put($name, $value);
$this->saveSession();
}

/**
Expand All @@ -75,5 +76,12 @@ public function getSessionValue($name)
public function deleteSessionValue($name)
{
$this->session->remove($name);
$this->saveSession();
}

protected function saveSession()
{
$this->session->reflash();
$this->session->save();
}
}

0 comments on commit aa9f65b

Please sign in to comment.