Skip to content

Commit 1f84b1f

Browse files
committed
[Session] remove lazy_write polyfill for php < 7.0
1 parent b935b93 commit 1f84b1f

File tree

2 files changed

+0
-17
lines changed

2 files changed

+0
-17
lines changed

src/Symfony/Component/HttpFoundation/Session/Storage/Handler/AbstractSessionHandler.php

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,6 @@ public function read($sessionId)
8888

8989
$data = $this->doRead($sessionId);
9090
$this->newSessionId = '' === $data ? $sessionId : null;
91-
if (\PHP_VERSION_ID < 70000) {
92-
$this->prefetchData = $data;
93-
}
9491

9592
return $data;
9693
}
@@ -100,14 +97,6 @@ public function read($sessionId)
10097
*/
10198
public function write($sessionId, $data)
10299
{
103-
if (\PHP_VERSION_ID < 70000 && $this->prefetchData) {
104-
$readData = $this->prefetchData;
105-
$this->prefetchData = null;
106-
107-
if ($readData === $data) {
108-
return $this->updateTimestamp($sessionId, $data);
109-
}
110-
}
111100
if (null === $this->igbinaryEmptyData) {
112101
// see https://github.com/igbinary/igbinary/issues/146
113102
$this->igbinaryEmptyData = \function_exists('igbinary_serialize') ? igbinary_serialize(array()) : '';
@@ -125,9 +114,6 @@ public function write($sessionId, $data)
125114
*/
126115
public function destroy($sessionId)
127116
{
128-
if (\PHP_VERSION_ID < 70000) {
129-
$this->prefetchData = null;
130-
}
131117
if (!headers_sent() && ini_get('session.use_cookies')) {
132118
if (!$this->sessionName) {
133119
throw new \LogicException(sprintf('Session name cannot be empty, did you forget to call "parent::open()" in "%s"?.', get_class($this)));

src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/AbstractSessionHandlerTest.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,6 @@
1313

1414
use PHPUnit\Framework\TestCase;
1515

16-
/**
17-
* @requires PHP 7.0
18-
*/
1916
class AbstractSessionHandlerTest extends TestCase
2017
{
2118
private static $server;

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy