summaryrefslogtreecommitdiff
path: root/vendor/symfony/http-foundation/Session
diff options
context:
space:
mode:
authorGreg Roach <fisharebest@webtrees.net>2018-07-27 12:21:34 +0100
committerGreg Roach <fisharebest@webtrees.net>2018-07-27 12:21:34 +0100
commitb646d0aa207ec67f8385350355eef400d32cbaec (patch)
treebd0ee950c7a3be4740d4519ecb681cdeed93ea33 /vendor/symfony/http-foundation/Session
parent709cf9d33cdbddcb178ad3b33a1afe38e2f0e953 (diff)
downloadwebtrees-b646d0aa207ec67f8385350355eef400d32cbaec.tar.gz
webtrees-b646d0aa207ec67f8385350355eef400d32cbaec.tar.bz2
webtrees-b646d0aa207ec67f8385350355eef400d32cbaec.zip
Update vendor dependencies
Diffstat (limited to 'vendor/symfony/http-foundation/Session')
-rw-r--r--vendor/symfony/http-foundation/Session/Attribute/NamespacedAttributeBag.php8
-rw-r--r--vendor/symfony/http-foundation/Session/Flash/FlashBagInterface.php2
-rw-r--r--vendor/symfony/http-foundation/Session/Session.php10
-rw-r--r--vendor/symfony/http-foundation/Session/SessionBagProxy.php5
-rw-r--r--vendor/symfony/http-foundation/Session/Storage/Handler/WriteCheckSessionHandler.php4
-rw-r--r--vendor/symfony/http-foundation/Session/Storage/NativeSessionStorage.php2
-rw-r--r--vendor/symfony/http-foundation/Session/Storage/Proxy/SessionHandlerProxy.php18
7 files changed, 33 insertions, 16 deletions
diff --git a/vendor/symfony/http-foundation/Session/Attribute/NamespacedAttributeBag.php b/vendor/symfony/http-foundation/Session/Attribute/NamespacedAttributeBag.php
index abbf37ee7c..f9df69e907 100644
--- a/vendor/symfony/http-foundation/Session/Attribute/NamespacedAttributeBag.php
+++ b/vendor/symfony/http-foundation/Session/Attribute/NamespacedAttributeBag.php
@@ -124,7 +124,13 @@ class NamespacedAttributeBag extends AttributeBag
foreach ($parts as $part) {
if (null !== $array && !array_key_exists($part, $array)) {
- $array[$part] = $writeContext ? array() : null;
+ if (!$writeContext) {
+ $null = null;
+
+ return $null;
+ }
+
+ $array[$part] = array();
}
$array = &$array[$part];
diff --git a/vendor/symfony/http-foundation/Session/Flash/FlashBagInterface.php b/vendor/symfony/http-foundation/Session/Flash/FlashBagInterface.php
index 80e97f17cd..f53c9dae6c 100644
--- a/vendor/symfony/http-foundation/Session/Flash/FlashBagInterface.php
+++ b/vendor/symfony/http-foundation/Session/Flash/FlashBagInterface.php
@@ -24,7 +24,7 @@ interface FlashBagInterface extends SessionBagInterface
* Adds a flash message for type.
*
* @param string $type
- * @param string $message
+ * @param mixed $message
*/
public function add($type, $message);
diff --git a/vendor/symfony/http-foundation/Session/Session.php b/vendor/symfony/http-foundation/Session/Session.php
index f0379c1697..c0978d552f 100644
--- a/vendor/symfony/http-foundation/Session/Session.php
+++ b/vendor/symfony/http-foundation/Session/Session.php
@@ -54,8 +54,6 @@ class Session implements SessionInterface, \IteratorAggregate, \Countable
*/
public function start()
{
- ++$this->usageIndex;
-
return $this->storage->start();
}
@@ -160,7 +158,9 @@ class Session implements SessionInterface, \IteratorAggregate, \Countable
*/
public function isEmpty()
{
- ++$this->usageIndex;
+ if ($this->isStarted()) {
+ ++$this->usageIndex;
+ }
foreach ($this->data as &$data) {
if (!empty($data)) {
return false;
@@ -185,8 +185,6 @@ class Session implements SessionInterface, \IteratorAggregate, \Countable
*/
public function migrate($destroy = false, $lifetime = null)
{
- ++$this->usageIndex;
-
return $this->storage->regenerate($destroy, $lifetime);
}
@@ -195,8 +193,6 @@ class Session implements SessionInterface, \IteratorAggregate, \Countable
*/
public function save()
{
- ++$this->usageIndex;
-
$this->storage->save();
}
diff --git a/vendor/symfony/http-foundation/Session/SessionBagProxy.php b/vendor/symfony/http-foundation/Session/SessionBagProxy.php
index 88005ee092..3504bdfe7b 100644
--- a/vendor/symfony/http-foundation/Session/SessionBagProxy.php
+++ b/vendor/symfony/http-foundation/Session/SessionBagProxy.php
@@ -44,6 +44,9 @@ final class SessionBagProxy implements SessionBagInterface
*/
public function isEmpty()
{
+ if (!isset($this->data[$this->bag->getStorageKey()])) {
+ return true;
+ }
++$this->usageIndex;
return empty($this->data[$this->bag->getStorageKey()]);
@@ -81,8 +84,6 @@ final class SessionBagProxy implements SessionBagInterface
*/
public function clear()
{
- ++$this->usageIndex;
-
return $this->bag->clear();
}
}
diff --git a/vendor/symfony/http-foundation/Session/Storage/Handler/WriteCheckSessionHandler.php b/vendor/symfony/http-foundation/Session/Storage/Handler/WriteCheckSessionHandler.php
index 1541ec4e0a..127e47f210 100644
--- a/vendor/symfony/http-foundation/Session/Storage/Handler/WriteCheckSessionHandler.php
+++ b/vendor/symfony/http-foundation/Session/Storage/Handler/WriteCheckSessionHandler.php
@@ -11,8 +11,6 @@
namespace Symfony\Component\HttpFoundation\Session\Storage\Handler;
-@trigger_error(sprintf('The %s class is deprecated since Symfony 3.4 and will be removed in 4.0. Implement `SessionUpdateTimestampHandlerInterface` or extend `AbstractSessionHandler` instead.', WriteCheckSessionHandler::class), E_USER_DEPRECATED);
-
/**
* Wraps another SessionHandlerInterface to only write the session when it has been modified.
*
@@ -31,6 +29,8 @@ class WriteCheckSessionHandler implements \SessionHandlerInterface
public function __construct(\SessionHandlerInterface $wrappedSessionHandler)
{
+ @trigger_error(sprintf('The %s class is deprecated since Symfony 3.4 and will be removed in 4.0. Implement `SessionUpdateTimestampHandlerInterface` or extend `AbstractSessionHandler` instead.', self::class), E_USER_DEPRECATED);
+
$this->wrappedSessionHandler = $wrappedSessionHandler;
}
diff --git a/vendor/symfony/http-foundation/Session/Storage/NativeSessionStorage.php b/vendor/symfony/http-foundation/Session/Storage/NativeSessionStorage.php
index 6416a03fdf..41410bd323 100644
--- a/vendor/symfony/http-foundation/Session/Storage/NativeSessionStorage.php
+++ b/vendor/symfony/http-foundation/Session/Storage/NativeSessionStorage.php
@@ -411,8 +411,6 @@ class NativeSessionStorage implements SessionStorageInterface
}
if ($this->saveHandler instanceof SessionHandlerProxy) {
- session_set_save_handler($this->saveHandler->getHandler(), false);
- } elseif ($this->saveHandler instanceof \SessionHandlerInterface) {
session_set_save_handler($this->saveHandler, false);
}
}
diff --git a/vendor/symfony/http-foundation/Session/Storage/Proxy/SessionHandlerProxy.php b/vendor/symfony/http-foundation/Session/Storage/Proxy/SessionHandlerProxy.php
index 53c1209a1c..b11cc397a0 100644
--- a/vendor/symfony/http-foundation/Session/Storage/Proxy/SessionHandlerProxy.php
+++ b/vendor/symfony/http-foundation/Session/Storage/Proxy/SessionHandlerProxy.php
@@ -14,7 +14,7 @@ namespace Symfony\Component\HttpFoundation\Session\Storage\Proxy;
/**
* @author Drak <drak@zikula.org>
*/
-class SessionHandlerProxy extends AbstractProxy implements \SessionHandlerInterface
+class SessionHandlerProxy extends AbstractProxy implements \SessionHandlerInterface, \SessionUpdateTimestampHandlerInterface
{
protected $handler;
@@ -82,4 +82,20 @@ class SessionHandlerProxy extends AbstractProxy implements \SessionHandlerInterf
{
return (bool) $this->handler->gc($maxlifetime);
}
+
+ /**
+ * {@inheritdoc}
+ */
+ public function validateId($sessionId)
+ {
+ return !$this->handler instanceof \SessionUpdateTimestampHandlerInterface || $this->handler->validateId($sessionId);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function updateTimestamp($sessionId, $data)
+ {
+ return $this->handler instanceof \SessionUpdateTimestampHandlerInterface ? $this->handler->updateTimestamp($sessionId, $data) : $this->write($sessionId, $data);
+ }
}