Skip to content

Commit d01f322

Browse files
Enable "native_constant_invocation" CS rule
1 parent e5a4288 commit d01f322

29 files changed

+95
-95
lines changed

AcceptHeader.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public static function fromString($headerValue)
5757
$item->setIndex($index++);
5858

5959
return $item;
60-
}, preg_split('/\s*(?:,*("[^"]+"),*|,*(\'[^\']+\'),*|,+)\s*/', $headerValue, 0, PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE)));
60+
}, preg_split('/\s*(?:,*("[^"]+"),*|,*(\'[^\']+\'),*|,+)\s*/', $headerValue, 0, \PREG_SPLIT_NO_EMPTY | \PREG_SPLIT_DELIM_CAPTURE)));
6161
}
6262

6363
/**

AcceptHeaderItem.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public function __construct($value, array $attributes = [])
4343
*/
4444
public static function fromString($itemValue)
4545
{
46-
$bits = preg_split('/\s*(?:;*("[^"]+");*|;*(\'[^\']+\');*|;+)\s*/', $itemValue, 0, PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE);
46+
$bits = preg_split('/\s*(?:;*("[^"]+");*|;*(\'[^\']+\');*|;+)\s*/', $itemValue, 0, \PREG_SPLIT_NO_EMPTY | \PREG_SPLIT_DELIM_CAPTURE);
4747
$value = array_shift($bits);
4848
$attributes = [];
4949

File/MimeType/FileinfoMimeTypeGuesser.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public function guess($path)
6060
return null;
6161
}
6262

63-
if (!$finfo = new \finfo(FILEINFO_MIME_TYPE, $this->magicFile)) {
63+
if (!$finfo = new \finfo(\FILEINFO_MIME_TYPE, $this->magicFile)) {
6464
return null;
6565
}
6666
$mimeType = $finfo->file($path);

File/UploadedFile.php

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,10 @@ public function __construct($path, $originalName, $mimeType = null, $size = null
6060
$this->originalName = $this->getName($originalName);
6161
$this->mimeType = $mimeType ?: 'application/octet-stream';
6262
$this->size = $size;
63-
$this->error = $error ?: UPLOAD_ERR_OK;
63+
$this->error = $error ?: \UPLOAD_ERR_OK;
6464
$this->test = (bool) $test;
6565

66-
parent::__construct($path, UPLOAD_ERR_OK === $this->error);
66+
parent::__construct($path, \UPLOAD_ERR_OK === $this->error);
6767
}
6868

6969
/**
@@ -89,7 +89,7 @@ public function getClientOriginalName()
8989
*/
9090
public function getClientOriginalExtension()
9191
{
92-
return pathinfo($this->originalName, PATHINFO_EXTENSION);
92+
return pathinfo($this->originalName, \PATHINFO_EXTENSION);
9393
}
9494

9595
/**
@@ -168,7 +168,7 @@ public function getError()
168168
*/
169169
public function isValid()
170170
{
171-
$isOk = UPLOAD_ERR_OK === $this->error;
171+
$isOk = \UPLOAD_ERR_OK === $this->error;
172172

173173
return $this->test ? $isOk : $isOk && is_uploaded_file($this->getPathname());
174174
}
@@ -217,7 +217,7 @@ public static function getMaxFilesize()
217217
$sizePostMax = self::parseFilesize(ini_get('post_max_size'));
218218
$sizeUploadMax = self::parseFilesize(ini_get('upload_max_filesize'));
219219

220-
return min($sizePostMax ?: PHP_INT_MAX, $sizeUploadMax ?: PHP_INT_MAX);
220+
return min($sizePostMax ?: \PHP_INT_MAX, $sizeUploadMax ?: \PHP_INT_MAX);
221221
}
222222

223223
/**
@@ -263,17 +263,17 @@ private static function parseFilesize($size)
263263
public function getErrorMessage()
264264
{
265265
static $errors = [
266-
UPLOAD_ERR_INI_SIZE => 'The file "%s" exceeds your upload_max_filesize ini directive (limit is %d KiB).',
267-
UPLOAD_ERR_FORM_SIZE => 'The file "%s" exceeds the upload limit defined in your form.',
268-
UPLOAD_ERR_PARTIAL => 'The file "%s" was only partially uploaded.',
269-
UPLOAD_ERR_NO_FILE => 'No file was uploaded.',
270-
UPLOAD_ERR_CANT_WRITE => 'The file "%s" could not be written on disk.',
271-
UPLOAD_ERR_NO_TMP_DIR => 'File could not be uploaded: missing temporary directory.',
272-
UPLOAD_ERR_EXTENSION => 'File upload was stopped by a PHP extension.',
266+
\UPLOAD_ERR_INI_SIZE => 'The file "%s" exceeds your upload_max_filesize ini directive (limit is %d KiB).',
267+
\UPLOAD_ERR_FORM_SIZE => 'The file "%s" exceeds the upload limit defined in your form.',
268+
\UPLOAD_ERR_PARTIAL => 'The file "%s" was only partially uploaded.',
269+
\UPLOAD_ERR_NO_FILE => 'No file was uploaded.',
270+
\UPLOAD_ERR_CANT_WRITE => 'The file "%s" could not be written on disk.',
271+
\UPLOAD_ERR_NO_TMP_DIR => 'File could not be uploaded: missing temporary directory.',
272+
\UPLOAD_ERR_EXTENSION => 'File upload was stopped by a PHP extension.',
273273
];
274274

275275
$errorCode = $this->error;
276-
$maxFilesize = UPLOAD_ERR_INI_SIZE === $errorCode ? self::getMaxFilesize() / 1024 : 0;
276+
$maxFilesize = \UPLOAD_ERR_INI_SIZE === $errorCode ? self::getMaxFilesize() / 1024 : 0;
277277
$message = isset($errors[$errorCode]) ? $errors[$errorCode] : 'The file "%s" was not uploaded due to an unknown error.';
278278

279279
return sprintf($message, $this->getClientOriginalName(), $maxFilesize);

FileBag.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ protected function convertFileInformation($file)
8181
sort($keys);
8282

8383
if ($keys == self::$fileKeys) {
84-
if (UPLOAD_ERR_NO_FILE == $file['error']) {
84+
if (\UPLOAD_ERR_NO_FILE == $file['error']) {
8585
$file = null;
8686
} else {
8787
$file = new UploadedFile($file['tmp_name'], $file['name'], $file['type'], $file['size'], $file['error']);

HeaderBag.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ public function getDate($key, \DateTime $default = null)
224224
return $default;
225225
}
226226

227-
if (false === $date = \DateTime::createFromFormat(DATE_RFC2822, $value)) {
227+
if (false === $date = \DateTime::createFromFormat(\DATE_RFC2822, $value)) {
228228
throw new \RuntimeException(sprintf('The "%s" HTTP header is not parseable (%s).', $key, $value));
229229
}
230230

@@ -329,7 +329,7 @@ protected function getCacheControlHeader()
329329
protected function parseCacheControl($header)
330330
{
331331
$cacheControl = [];
332-
preg_match_all('#([a-zA-Z][a-zA-Z_-]*)\s*(?:=(?:"([^"]*)"|([^ \t",;]*)))?#', $header, $matches, PREG_SET_ORDER);
332+
preg_match_all('#([a-zA-Z][a-zA-Z_-]*)\s*(?:=(?:"([^"]*)"|([^ \t",;]*)))?#', $header, $matches, \PREG_SET_ORDER);
333333
foreach ($matches as $match) {
334334
$cacheControl[strtolower($match[1])] = isset($match[3]) ? $match[3] : (isset($match[2]) ? $match[2] : true);
335335
}

IpUtils.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,15 +68,15 @@ public static function checkIp4($requestIp, $ip)
6868
return self::$checkedIps[$cacheKey];
6969
}
7070

71-
if (!filter_var($requestIp, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4)) {
71+
if (!filter_var($requestIp, \FILTER_VALIDATE_IP, \FILTER_FLAG_IPV4)) {
7272
return self::$checkedIps[$cacheKey] = false;
7373
}
7474

7575
if (false !== strpos($ip, '/')) {
7676
list($address, $netmask) = explode('/', $ip, 2);
7777

7878
if ('0' === $netmask) {
79-
return self::$checkedIps[$cacheKey] = filter_var($address, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4);
79+
return self::$checkedIps[$cacheKey] = filter_var($address, \FILTER_VALIDATE_IP, \FILTER_FLAG_IPV4);
8080
}
8181

8282
if ($netmask < 0 || $netmask > 32) {

JsonResponse.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,13 +173,13 @@ public function setData($data = [])
173173
throw $e;
174174
}
175175

176-
if (\PHP_VERSION_ID >= 70300 && (JSON_THROW_ON_ERROR & $this->encodingOptions)) {
176+
if (\PHP_VERSION_ID >= 70300 && (\JSON_THROW_ON_ERROR & $this->encodingOptions)) {
177177
return $this->setJson($data);
178178
}
179179
}
180180
}
181181

182-
if (JSON_ERROR_NONE !== json_last_error()) {
182+
if (\JSON_ERROR_NONE !== json_last_error()) {
183183
throw new \InvalidArgumentException(json_last_error_msg());
184184
}
185185

ParameterBag.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ public function getAlnum($key, $default = '')
154154
public function getDigits($key, $default = '')
155155
{
156156
// we need to remove - and + because they're allowed in the filter
157-
return str_replace(['-', '+'], '', $this->filter($key, $default, FILTER_SANITIZE_NUMBER_INT));
157+
return str_replace(['-', '+'], '', $this->filter($key, $default, \FILTER_SANITIZE_NUMBER_INT));
158158
}
159159

160160
/**
@@ -180,7 +180,7 @@ public function getInt($key, $default = 0)
180180
*/
181181
public function getBoolean($key, $default = false)
182182
{
183-
return $this->filter($key, $default, FILTER_VALIDATE_BOOLEAN);
183+
return $this->filter($key, $default, \FILTER_VALIDATE_BOOLEAN);
184184
}
185185

186186
/**
@@ -195,7 +195,7 @@ public function getBoolean($key, $default = false)
195195
*
196196
* @return mixed
197197
*/
198-
public function filter($key, $default = null, $filter = FILTER_DEFAULT, $options = [])
198+
public function filter($key, $default = null, $filter = \FILTER_DEFAULT, $options = [])
199199
{
200200
$value = $this->get($key, $default);
201201

@@ -206,7 +206,7 @@ public function filter($key, $default = null, $filter = FILTER_DEFAULT, $options
206206

207207
// Add a convenience check for arrays.
208208
if (\is_array($value) && !isset($options['flags'])) {
209-
$options['flags'] = FILTER_REQUIRE_ARRAY;
209+
$options['flags'] = \FILTER_REQUIRE_ARRAY;
210210
}
211211

212212
return filter_var($value, $filter, $options);

RedirectResponse.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public function __construct($url, $status = 302, $headers = [])
4242
throw new \InvalidArgumentException(sprintf('The HTTP status code is not a redirect ("%s" given).', $status));
4343
}
4444

45-
if (301 == $status && !\array_key_exists('cache-control', array_change_key_case($headers, CASE_LOWER))) {
45+
if (301 == $status && !\array_key_exists('cache-control', array_change_key_case($headers, \CASE_LOWER))) {
4646
$this->headers->remove('cache-control');
4747
}
4848
}
@@ -100,7 +100,7 @@ public function setTargetUrl($url)
100100
<body>
101101
Redirecting to <a href="%1$s">%1$s</a>.
102102
</body>
103-
</html>', htmlspecialchars($url, ENT_QUOTES, 'UTF-8')));
103+
</html>', htmlspecialchars($url, \ENT_QUOTES, 'UTF-8')));
104104

105105
$this->headers->set('Location', $url);
106106

Request.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -532,7 +532,7 @@ public function __toString()
532532
throw $e;
533533
}
534534

535-
return trigger_error($e, E_USER_ERROR);
535+
return trigger_error($e, \E_USER_ERROR);
536536
}
537537

538538
$cookieHeader = '';
@@ -603,7 +603,7 @@ public static function setTrustedProxies(array $proxies/*, int $trustedHeaderSet
603603
self::$trustedProxies = $proxies;
604604

605605
if (2 > \func_num_args()) {
606-
@trigger_error(sprintf('The %s() method expects a bit field of Request::HEADER_* as second argument since Symfony 3.3. Defining it will be required in 4.0. ', __METHOD__), E_USER_DEPRECATED);
606+
@trigger_error(sprintf('The %s() method expects a bit field of Request::HEADER_* as second argument since Symfony 3.3. Defining it will be required in 4.0. ', __METHOD__), \E_USER_DEPRECATED);
607607

608608
return;
609609
}
@@ -683,7 +683,7 @@ public static function getTrustedHosts()
683683
*/
684684
public static function setTrustedHeaderName($key, $value)
685685
{
686-
@trigger_error(sprintf('The "%s()" method is deprecated since Symfony 3.3 and will be removed in 4.0. Use the $trustedHeaderSet argument of the Request::setTrustedProxies() method instead.', __METHOD__), E_USER_DEPRECATED);
686+
@trigger_error(sprintf('The "%s()" method is deprecated since Symfony 3.3 and will be removed in 4.0. Use the $trustedHeaderSet argument of the Request::setTrustedProxies() method instead.', __METHOD__), \E_USER_DEPRECATED);
687687

688688
if ('forwarded' === $key) {
689689
$key = self::HEADER_FORWARDED;
@@ -723,7 +723,7 @@ public static function setTrustedHeaderName($key, $value)
723723
public static function getTrustedHeaderName($key)
724724
{
725725
if (2 > \func_num_args() || func_get_arg(1)) {
726-
@trigger_error(sprintf('The "%s()" method is deprecated since Symfony 3.3 and will be removed in 4.0. Use the Request::getTrustedHeaderSet() method instead.', __METHOD__), E_USER_DEPRECATED);
726+
@trigger_error(sprintf('The "%s()" method is deprecated since Symfony 3.3 and will be removed in 4.0. Use the Request::getTrustedHeaderSet() method instead.', __METHOD__), \E_USER_DEPRECATED);
727727
}
728728

729729
if (!\array_key_exists($key, self::$trustedHeaders)) {
@@ -771,7 +771,7 @@ public static function normalizeQueryString($qs)
771771
$order[] = urldecode($keyValuePair[0]);
772772
}
773773

774-
array_multisort($order, SORT_ASC, $parts);
774+
array_multisort($order, \SORT_ASC, $parts);
775775

776776
return implode('&', $parts);
777777
}
@@ -1584,7 +1584,7 @@ public function isMethodSafe(/* $andCacheable = true */)
15841584
if (!\func_num_args() || func_get_arg(0)) {
15851585
// This deprecation should be turned into a BadMethodCallException in 4.0 (without adding the argument in the signature)
15861586
// then setting $andCacheable to false should be deprecated in 4.1
1587-
@trigger_error('Checking only for cacheable HTTP methods with Symfony\Component\HttpFoundation\Request::isMethodSafe() is deprecated since Symfony 3.2 and will throw an exception in 4.0. Disable checking only for cacheable methods by calling the method with `false` as first argument or use the Request::isMethodCacheable() instead.', E_USER_DEPRECATED);
1587+
@trigger_error('Checking only for cacheable HTTP methods with Symfony\Component\HttpFoundation\Request::isMethodSafe() is deprecated since Symfony 3.2 and will throw an exception in 4.0. Disable checking only for cacheable methods by calling the method with `false` as first argument or use the Request::isMethodCacheable() instead.', \E_USER_DEPRECATED);
15881588

15891589
return \in_array($this->getMethod(), ['GET', 'HEAD']);
15901590
}
@@ -1695,7 +1695,7 @@ public function getContent($asResource = false)
16951695
*/
16961696
public function getETags()
16971697
{
1698-
return preg_split('/\s*,\s*/', $this->headers->get('if_none_match'), null, PREG_SPLIT_NO_EMPTY);
1698+
return preg_split('/\s*,\s*/', $this->headers->get('if_none_match'), null, \PREG_SPLIT_NO_EMPTY);
16991699
}
17001700

17011701
/**
@@ -2175,7 +2175,7 @@ private function normalizeAndFilterClientIps(array $clientIps, $ip)
21752175
$clientIps[$key] = $clientIp = substr($clientIp, 1, $i - 1);
21762176
}
21772177

2178-
if (!filter_var($clientIp, FILTER_VALIDATE_IP)) {
2178+
if (!filter_var($clientIp, \FILTER_VALIDATE_IP)) {
21792179
unset($clientIps[$key]);
21802180

21812181
continue;

Response.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -738,7 +738,7 @@ public function getExpires()
738738
return $this->headers->getDate('Expires');
739739
} catch (\RuntimeException $e) {
740740
// according to RFC 2616 invalid date formats (e.g. "0" and "-1") must be treated as in the past
741-
return \DateTime::createFromFormat(DATE_RFC2822, 'Sat, 01 Jan 00 00:00:00 +0000');
741+
return \DateTime::createFromFormat(\DATE_RFC2822, 'Sat, 01 Jan 00 00:00:00 +0000');
742742
}
743743
}
744744

@@ -1283,7 +1283,7 @@ public static function closeOutputBuffers($targetLevel, $flush)
12831283
$status = ob_get_status(true);
12841284
$level = \count($status);
12851285
// PHP_OUTPUT_HANDLER_* are not defined on HHVM 3.3
1286-
$flags = \defined('PHP_OUTPUT_HANDLER_REMOVABLE') ? PHP_OUTPUT_HANDLER_REMOVABLE | ($flush ? PHP_OUTPUT_HANDLER_FLUSHABLE : PHP_OUTPUT_HANDLER_CLEANABLE) : -1;
1286+
$flags = \defined('PHP_OUTPUT_HANDLER_REMOVABLE') ? \PHP_OUTPUT_HANDLER_REMOVABLE | ($flush ? \PHP_OUTPUT_HANDLER_FLUSHABLE : \PHP_OUTPUT_HANDLER_CLEANABLE) : -1;
12871287

12881288
while ($level-- > $targetLevel && ($s = $status[$level]) && (!isset($s['del']) ? !isset($s['flags']) || ($s['flags'] & $flags) === $flags : $s['del'])) {
12891289
if ($flush) {

Session/Storage/Handler/AbstractSessionHandler.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ public function validateId($sessionId)
7373

7474
if (\PHP_VERSION_ID < 70317 || (70400 <= \PHP_VERSION_ID && \PHP_VERSION_ID < 70405)) {
7575
// work around https://bugs.php.net/79413
76-
foreach (debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS) as $frame) {
76+
foreach (debug_backtrace(\DEBUG_BACKTRACE_IGNORE_ARGS) as $frame) {
7777
if (!isset($frame['class']) && isset($frame['function']) && \in_array($frame['function'], ['session_regenerate_id', 'session_create_id'], true)) {
7878
return '' === $this->prefetchData;
7979
}
@@ -142,7 +142,7 @@ public function destroy($sessionId)
142142
if (\PHP_VERSION_ID < 70000) {
143143
$this->prefetchData = null;
144144
}
145-
if (!headers_sent() && filter_var(ini_get('session.use_cookies'), FILTER_VALIDATE_BOOLEAN)) {
145+
if (!headers_sent() && filter_var(ini_get('session.use_cookies'), \FILTER_VALIDATE_BOOLEAN)) {
146146
if (!$this->sessionName) {
147147
throw new \LogicException(sprintf('Session name cannot be empty, did you forget to call "parent::open()" in "%s"?.', static::class));
148148
}
@@ -157,7 +157,7 @@ public function destroy($sessionId)
157157
*/
158158
if (null === $cookie || isset($_COOKIE[$this->sessionName])) {
159159
if (\PHP_VERSION_ID < 70300) {
160-
setcookie($this->sessionName, '', 0, ini_get('session.cookie_path'), ini_get('session.cookie_domain'), filter_var(ini_get('session.cookie_secure'), FILTER_VALIDATE_BOOLEAN), filter_var(ini_get('session.cookie_httponly'), FILTER_VALIDATE_BOOLEAN));
160+
setcookie($this->sessionName, '', 0, ini_get('session.cookie_path'), ini_get('session.cookie_domain'), filter_var(ini_get('session.cookie_secure'), \FILTER_VALIDATE_BOOLEAN), filter_var(ini_get('session.cookie_httponly'), \FILTER_VALIDATE_BOOLEAN));
161161
} else {
162162
$params = session_get_cookie_params();
163163
unset($params['lifetime']);

Session/Storage/Handler/MemcacheSessionHandler.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
namespace Symfony\Component\HttpFoundation\Session\Storage\Handler;
1313

14-
@trigger_error(sprintf('The class %s is deprecated since Symfony 3.4 and will be removed in 4.0. Use Symfony\Component\HttpFoundation\Session\Storage\Handler\MemcachedSessionHandler instead.', MemcacheSessionHandler::class), E_USER_DEPRECATED);
14+
@trigger_error(sprintf('The class %s is deprecated since Symfony 3.4 and will be removed in 4.0. Use Symfony\Component\HttpFoundation\Session\Storage\Handler\MemcachedSessionHandler instead.', MemcacheSessionHandler::class), \E_USER_DEPRECATED);
1515

1616
/**
1717
* @author Drak <drak@zikula.org>

Session/Storage/Handler/MongoDbSessionHandler.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ class MongoDbSessionHandler extends AbstractSessionHandler
7070
public function __construct($mongo, array $options)
7171
{
7272
if ($mongo instanceof \MongoClient || $mongo instanceof \Mongo) {
73-
@trigger_error(sprintf('Using %s with the legacy mongo extension is deprecated as of 3.4 and will be removed in 4.0. Use it with the mongodb/mongodb package and ext-mongodb instead.', __CLASS__), E_USER_DEPRECATED);
73+
@trigger_error(sprintf('Using %s with the legacy mongo extension is deprecated as of 3.4 and will be removed in 4.0. Use it with the mongodb/mongodb package and ext-mongodb instead.', __CLASS__), \E_USER_DEPRECATED);
7474
}
7575

7676
if (!($mongo instanceof \MongoDB\Client || $mongo instanceof \MongoClient || $mongo instanceof \Mongo)) {

Session/Storage/Handler/NativeSessionHandler.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,6 @@ class NativeSessionHandler extends \SessionHandler
1919
{
2020
public function __construct()
2121
{
22-
@trigger_error('The '.__NAMESPACE__.'\NativeSessionHandler class is deprecated since Symfony 3.4 and will be removed in 4.0. Use the \SessionHandler class instead.', E_USER_DEPRECATED);
22+
@trigger_error('The '.__NAMESPACE__.'\NativeSessionHandler class is deprecated since Symfony 3.4 and will be removed in 4.0. Use the \SessionHandler class instead.', \E_USER_DEPRECATED);
2323
}
2424
}

Session/Storage/Handler/PdoSessionHandler.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -637,7 +637,7 @@ protected function doRead($sessionId)
637637
throw new \RuntimeException('Failed to read session: INSERT reported a duplicate id but next SELECT did not return any data.');
638638
}
639639

640-
if (!filter_var(ini_get('session.use_strict_mode'), FILTER_VALIDATE_BOOLEAN) && self::LOCK_TRANSACTIONAL === $this->lockMode && 'sqlite' !== $this->driver) {
640+
if (!filter_var(ini_get('session.use_strict_mode'), \FILTER_VALIDATE_BOOLEAN) && self::LOCK_TRANSACTIONAL === $this->lockMode && 'sqlite' !== $this->driver) {
641641
// In strict mode, session fixation is not possible: new sessions always start with a unique
642642
// random id, so that concurrency is not possible and this code path can be skipped.
643643
// Exclusive-reading of non-existent rows does not block, so we need to do an insert to block

0 commit comments

Comments
 (0)