Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 1f84b1f

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

File tree

2 files changed

+0
-17
lines changed
Filter options

2 files changed

+0
-17
lines changed

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

Copy file name to clipboardExpand all lines: src/Symfony/Component/HttpFoundation/Session/Storage/Handler/AbstractSessionHandler.php
-14Lines 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

Copy file name to clipboardExpand all lines: src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/AbstractSessionHandlerTest.php
-3Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.