Core and composer updates
This commit is contained in:
parent
a82634bb98
commit
62cac30480
1118 changed files with 21770 additions and 6306 deletions
|
@ -13,7 +13,7 @@ namespace Symfony\Component\HttpFoundation\Session\Storage\Handler;
|
|||
|
||||
// Adds SessionHandler functionality if available.
|
||||
// @see http://php.net/sessionhandler
|
||||
if (PHP_VERSION_ID >= 50400) {
|
||||
if (\PHP_VERSION_ID >= 50400) {
|
||||
class NativeSessionHandler extends \SessionHandler
|
||||
{
|
||||
}
|
||||
|
|
|
@ -81,6 +81,7 @@ class NativeSessionStorage implements SessionStorageInterface
|
|||
* name, "PHPSESSID"
|
||||
* referer_check, ""
|
||||
* serialize_handler, "php"
|
||||
* use_strict_mode, "0"
|
||||
* use_cookies, "1"
|
||||
* use_only_cookies, "1"
|
||||
* use_trans_sid, "0"
|
||||
|
@ -127,11 +128,11 @@ class NativeSessionStorage implements SessionStorageInterface
|
|||
return true;
|
||||
}
|
||||
|
||||
if (PHP_VERSION_ID >= 50400 && \PHP_SESSION_ACTIVE === session_status()) {
|
||||
if (\PHP_VERSION_ID >= 50400 && \PHP_SESSION_ACTIVE === session_status()) {
|
||||
throw new \RuntimeException('Failed to start the session: already started by PHP.');
|
||||
}
|
||||
|
||||
if (PHP_VERSION_ID < 50400 && !$this->closed && isset($_SESSION) && session_id()) {
|
||||
if (\PHP_VERSION_ID < 50400 && !$this->closed && isset($_SESSION) && session_id()) {
|
||||
// not 100% fool-proof, but is the most reliable way to determine if a session is active in PHP 5.3
|
||||
throw new \RuntimeException('Failed to start the session: already started by PHP ($_SESSION is set).');
|
||||
}
|
||||
|
@ -192,12 +193,12 @@ class NativeSessionStorage implements SessionStorageInterface
|
|||
public function regenerate($destroy = false, $lifetime = null)
|
||||
{
|
||||
// Cannot regenerate the session ID for non-active sessions.
|
||||
if (PHP_VERSION_ID >= 50400 && \PHP_SESSION_ACTIVE !== session_status()) {
|
||||
if (\PHP_VERSION_ID >= 50400 && \PHP_SESSION_ACTIVE !== session_status()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Check if session ID exists in PHP 5.3
|
||||
if (PHP_VERSION_ID < 50400 && '' === session_id()) {
|
||||
if (\PHP_VERSION_ID < 50400 && '' === session_id()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -331,7 +332,7 @@ class NativeSessionStorage implements SessionStorageInterface
|
|||
'entropy_file', 'entropy_length', 'gc_divisor',
|
||||
'gc_maxlifetime', 'gc_probability', 'hash_bits_per_character',
|
||||
'hash_function', 'name', 'referer_check',
|
||||
'serialize_handler', 'use_cookies',
|
||||
'serialize_handler', 'use_strict_mode', 'use_cookies',
|
||||
'use_only_cookies', 'use_trans_sid', 'upload_progress.enabled',
|
||||
'upload_progress.cleanup', 'upload_progress.prefix', 'upload_progress.name',
|
||||
'upload_progress.freq', 'upload_progress.min-freq', 'url_rewriter.tags',
|
||||
|
@ -379,13 +380,13 @@ class NativeSessionStorage implements SessionStorageInterface
|
|||
if (!$saveHandler instanceof AbstractProxy && $saveHandler instanceof \SessionHandlerInterface) {
|
||||
$saveHandler = new SessionHandlerProxy($saveHandler);
|
||||
} elseif (!$saveHandler instanceof AbstractProxy) {
|
||||
$saveHandler = PHP_VERSION_ID >= 50400 ?
|
||||
$saveHandler = \PHP_VERSION_ID >= 50400 ?
|
||||
new SessionHandlerProxy(new \SessionHandler()) : new NativeProxy();
|
||||
}
|
||||
$this->saveHandler = $saveHandler;
|
||||
|
||||
if ($this->saveHandler instanceof \SessionHandlerInterface) {
|
||||
if (PHP_VERSION_ID >= 50400) {
|
||||
if (\PHP_VERSION_ID >= 50400) {
|
||||
session_set_save_handler($this->saveHandler, false);
|
||||
} else {
|
||||
session_set_save_handler(
|
||||
|
|
|
@ -72,7 +72,7 @@ abstract class AbstractProxy
|
|||
*/
|
||||
public function isActive()
|
||||
{
|
||||
if (PHP_VERSION_ID >= 50400) {
|
||||
if (\PHP_VERSION_ID >= 50400) {
|
||||
return $this->active = \PHP_SESSION_ACTIVE === session_status();
|
||||
}
|
||||
|
||||
|
@ -93,7 +93,7 @@ abstract class AbstractProxy
|
|||
*/
|
||||
public function setActive($flag)
|
||||
{
|
||||
if (PHP_VERSION_ID >= 50400) {
|
||||
if (\PHP_VERSION_ID >= 50400) {
|
||||
throw new \LogicException('This method is disabled in PHP 5.4.0+');
|
||||
}
|
||||
|
||||
|
|
Reference in a new issue