diff options
| author | Greg Roach <fisharebest@gmail.com> | 2017-11-12 16:08:46 +0000 |
|---|---|---|
| committer | Greg Roach <fisharebest@gmail.com> | 2017-11-13 11:24:00 +0000 |
| commit | 025f16b9ad2e4c24f5dbfe8cc421b96807c3df25 (patch) | |
| tree | 31c8fd1b04fb15ab1c9d8f6085a3ec04aa0475ca /vendor/symfony/http-foundation/Session | |
| parent | b6f3e912ccefb7cbf9669cb885d33550d9423374 (diff) | |
| download | webtrees-025f16b9ad2e4c24f5dbfe8cc421b96807c3df25.tar.gz webtrees-025f16b9ad2e4c24f5dbfe8cc421b96807c3df25.tar.bz2 webtrees-025f16b9ad2e4c24f5dbfe8cc421b96807c3df25.zip | |
Update dependencies
Diffstat (limited to 'vendor/symfony/http-foundation/Session')
19 files changed, 27 insertions, 97 deletions
diff --git a/vendor/symfony/http-foundation/Session/Attribute/AttributeBag.php b/vendor/symfony/http-foundation/Session/Attribute/AttributeBag.php index 57c297197b..ea1fda290f 100644 --- a/vendor/symfony/http-foundation/Session/Attribute/AttributeBag.php +++ b/vendor/symfony/http-foundation/Session/Attribute/AttributeBag.php @@ -17,15 +17,8 @@ namespace Symfony\Component\HttpFoundation\Session\Attribute; class AttributeBag implements AttributeBagInterface, \IteratorAggregate, \Countable { private $name = 'attributes'; - - /** - * @var string - */ private $storageKey; - /** - * @var array - */ protected $attributes = array(); /** diff --git a/vendor/symfony/http-foundation/Session/Attribute/NamespacedAttributeBag.php b/vendor/symfony/http-foundation/Session/Attribute/NamespacedAttributeBag.php index e149801aad..abbf37ee7c 100644 --- a/vendor/symfony/http-foundation/Session/Attribute/NamespacedAttributeBag.php +++ b/vendor/symfony/http-foundation/Session/Attribute/NamespacedAttributeBag.php @@ -19,11 +19,6 @@ namespace Symfony\Component\HttpFoundation\Session\Attribute; */ class NamespacedAttributeBag extends AttributeBag { - /** - * Namespace character. - * - * @var string - */ private $namespaceCharacter; /** diff --git a/vendor/symfony/http-foundation/Session/Flash/AutoExpireFlashBag.php b/vendor/symfony/http-foundation/Session/Flash/AutoExpireFlashBag.php index 8110aee0cf..59ba309005 100644 --- a/vendor/symfony/http-foundation/Session/Flash/AutoExpireFlashBag.php +++ b/vendor/symfony/http-foundation/Session/Flash/AutoExpireFlashBag.php @@ -19,19 +19,7 @@ namespace Symfony\Component\HttpFoundation\Session\Flash; class AutoExpireFlashBag implements FlashBagInterface { private $name = 'flashes'; - - /** - * Flash messages. - * - * @var array - */ private $flashes = array('display' => array(), 'new' => array()); - - /** - * The storage key for flashes in the session. - * - * @var string - */ private $storageKey; /** diff --git a/vendor/symfony/http-foundation/Session/Flash/FlashBag.php b/vendor/symfony/http-foundation/Session/Flash/FlashBag.php index a86dc6c1a2..9c2e3fe7c8 100644 --- a/vendor/symfony/http-foundation/Session/Flash/FlashBag.php +++ b/vendor/symfony/http-foundation/Session/Flash/FlashBag.php @@ -19,19 +19,7 @@ namespace Symfony\Component\HttpFoundation\Session\Flash; class FlashBag implements FlashBagInterface { private $name = 'flashes'; - - /** - * Flash messages. - * - * @var array - */ private $flashes = array(); - - /** - * The storage key for flashes in the session. - * - * @var string - */ private $storageKey; /** diff --git a/vendor/symfony/http-foundation/Session/Flash/FlashBagInterface.php b/vendor/symfony/http-foundation/Session/Flash/FlashBagInterface.php index 25f3d57b54..80e97f17cd 100644 --- a/vendor/symfony/http-foundation/Session/Flash/FlashBagInterface.php +++ b/vendor/symfony/http-foundation/Session/Flash/FlashBagInterface.php @@ -72,8 +72,6 @@ interface FlashBagInterface extends SessionBagInterface /** * Sets all flash messages. - * - * @param array $messages */ public function setAll(array $messages); diff --git a/vendor/symfony/http-foundation/Session/Session.php b/vendor/symfony/http-foundation/Session/Session.php index f063651a18..09caa3442f 100644 --- a/vendor/symfony/http-foundation/Session/Session.php +++ b/vendor/symfony/http-foundation/Session/Session.php @@ -24,21 +24,9 @@ use Symfony\Component\HttpFoundation\Session\Storage\NativeSessionStorage; */ class Session implements SessionInterface, \IteratorAggregate, \Countable { - /** - * Storage driver. - * - * @var SessionStorageInterface - */ protected $storage; - /** - * @var string - */ private $flashName; - - /** - * @var string - */ private $attributeName; /** diff --git a/vendor/symfony/http-foundation/Session/SessionBagInterface.php b/vendor/symfony/http-foundation/Session/SessionBagInterface.php index aca18aacbf..8e37d06d65 100644 --- a/vendor/symfony/http-foundation/Session/SessionBagInterface.php +++ b/vendor/symfony/http-foundation/Session/SessionBagInterface.php @@ -27,8 +27,6 @@ interface SessionBagInterface /** * Initializes the Bag. - * - * @param array $array */ public function initialize(array &$array); diff --git a/vendor/symfony/http-foundation/Session/SessionInterface.php b/vendor/symfony/http-foundation/Session/SessionInterface.php index 172c9b457f..95fca857e2 100644 --- a/vendor/symfony/http-foundation/Session/SessionInterface.php +++ b/vendor/symfony/http-foundation/Session/SessionInterface.php @@ -159,8 +159,6 @@ interface SessionInterface /** * Registers a SessionBagInterface with the session. - * - * @param SessionBagInterface $bag */ public function registerBag(SessionBagInterface $bag); diff --git a/vendor/symfony/http-foundation/Session/Storage/Handler/MemcacheSessionHandler.php b/vendor/symfony/http-foundation/Session/Storage/Handler/MemcacheSessionHandler.php index d31aa7667e..89b4dac2c6 100644 --- a/vendor/symfony/http-foundation/Session/Storage/Handler/MemcacheSessionHandler.php +++ b/vendor/symfony/http-foundation/Session/Storage/Handler/MemcacheSessionHandler.php @@ -16,9 +16,6 @@ namespace Symfony\Component\HttpFoundation\Session\Storage\Handler; */ class MemcacheSessionHandler implements \SessionHandlerInterface { - /** - * @var \Memcache Memcache driver - */ private $memcache; /** diff --git a/vendor/symfony/http-foundation/Session/Storage/Handler/MemcachedSessionHandler.php b/vendor/symfony/http-foundation/Session/Storage/Handler/MemcachedSessionHandler.php index 3bbde5420d..6e2c2ee306 100644 --- a/vendor/symfony/http-foundation/Session/Storage/Handler/MemcachedSessionHandler.php +++ b/vendor/symfony/http-foundation/Session/Storage/Handler/MemcachedSessionHandler.php @@ -21,9 +21,6 @@ namespace Symfony\Component\HttpFoundation\Session\Storage\Handler; */ class MemcachedSessionHandler implements \SessionHandlerInterface { - /** - * @var \Memcached Memcached driver - */ private $memcached; /** diff --git a/vendor/symfony/http-foundation/Session/Storage/Handler/MongoDbSessionHandler.php b/vendor/symfony/http-foundation/Session/Storage/Handler/MongoDbSessionHandler.php index f140939dbd..29fc3f529b 100644 --- a/vendor/symfony/http-foundation/Session/Storage/Handler/MongoDbSessionHandler.php +++ b/vendor/symfony/http-foundation/Session/Storage/Handler/MongoDbSessionHandler.php @@ -16,9 +16,6 @@ namespace Symfony\Component\HttpFoundation\Session\Storage\Handler; */ class MongoDbSessionHandler implements \SessionHandlerInterface { - /** - * @var \Mongo|\MongoClient|\MongoDB\Client - */ private $mongo; /** diff --git a/vendor/symfony/http-foundation/Session/Storage/Handler/PdoSessionHandler.php b/vendor/symfony/http-foundation/Session/Storage/Handler/PdoSessionHandler.php index 5cdac63939..daabbc21f0 100644 --- a/vendor/symfony/http-foundation/Session/Storage/Handler/PdoSessionHandler.php +++ b/vendor/symfony/http-foundation/Session/Storage/Handler/PdoSessionHandler.php @@ -387,7 +387,7 @@ class PdoSessionHandler implements \SessionHandlerInterface $this->gcCalled = false; // delete the session records that have expired - $sql = "DELETE FROM $this->table WHERE $this->lifetimeCol + $this->timeCol < :time"; + $sql = "DELETE FROM $this->table WHERE $this->lifetimeCol < :time - $this->timeCol"; $stmt = $this->pdo->prepare($sql); $stmt->bindValue(':time', time(), \PDO::PARAM_INT); diff --git a/vendor/symfony/http-foundation/Session/Storage/Handler/WriteCheckSessionHandler.php b/vendor/symfony/http-foundation/Session/Storage/Handler/WriteCheckSessionHandler.php index d49c36cae5..7f4b6bc034 100644 --- a/vendor/symfony/http-foundation/Session/Storage/Handler/WriteCheckSessionHandler.php +++ b/vendor/symfony/http-foundation/Session/Storage/Handler/WriteCheckSessionHandler.php @@ -18,9 +18,6 @@ namespace Symfony\Component\HttpFoundation\Session\Storage\Handler; */ class WriteCheckSessionHandler implements \SessionHandlerInterface { - /** - * @var \SessionHandlerInterface - */ private $wrappedSessionHandler; /** diff --git a/vendor/symfony/http-foundation/Session/Storage/MockArraySessionStorage.php b/vendor/symfony/http-foundation/Session/Storage/MockArraySessionStorage.php index 0349a43367..027f4efffc 100644 --- a/vendor/symfony/http-foundation/Session/Storage/MockArraySessionStorage.php +++ b/vendor/symfony/http-foundation/Session/Storage/MockArraySessionStorage.php @@ -72,11 +72,6 @@ class MockArraySessionStorage implements SessionStorageInterface $this->setMetadataBag($metaBag); } - /** - * Sets the session data. - * - * @param array $array - */ public function setSessionData(array $array) { $this->data = $array; @@ -213,11 +208,6 @@ class MockArraySessionStorage implements SessionStorageInterface return $this->started; } - /** - * Sets the MetadataBag. - * - * @param MetadataBag $bag - */ public function setMetadataBag(MetadataBag $bag = null) { if (null === $bag) { diff --git a/vendor/symfony/http-foundation/Session/Storage/MockFileSessionStorage.php b/vendor/symfony/http-foundation/Session/Storage/MockFileSessionStorage.php index 8c1bf73cae..0a580d6027 100644 --- a/vendor/symfony/http-foundation/Session/Storage/MockFileSessionStorage.php +++ b/vendor/symfony/http-foundation/Session/Storage/MockFileSessionStorage.php @@ -24,9 +24,6 @@ namespace Symfony\Component\HttpFoundation\Session\Storage; */ class MockFileSessionStorage extends MockArraySessionStorage { - /** - * @var string - */ private $savePath; /** diff --git a/vendor/symfony/http-foundation/Session/Storage/NativeSessionStorage.php b/vendor/symfony/http-foundation/Session/Storage/NativeSessionStorage.php index 8f4ebefaab..b27591ec10 100644 --- a/vendor/symfony/http-foundation/Session/Storage/NativeSessionStorage.php +++ b/vendor/symfony/http-foundation/Session/Storage/NativeSessionStorage.php @@ -76,6 +76,7 @@ class NativeSessionStorage implements SessionStorageInterface * gc_probability, "1" * hash_bits_per_character, "4" * hash_function, "0" + * lazy_write, "1" * name, "PHPSESSID" * referer_check, "" * serialize_handler, "php" @@ -101,12 +102,20 @@ class NativeSessionStorage implements SessionStorageInterface */ public function __construct(array $options = array(), $handler = null, MetadataBag $metaBag = null) { - session_cache_limiter(''); // disable by default because it's managed by HeaderBag (if used) - ini_set('session.use_cookies', 1); + $this->setMetadataBag($metaBag); + + if (\PHP_SESSION_ACTIVE === session_status()) { + return; + } + + $options += array( + // disable by default because it's managed by HeaderBag (if used) + 'cache_limiter' => '', + 'use_cookies' => 1, + ); session_register_shutdown(); - $this->setMetadataBag($metaBag); $this->setOptions($options); $this->setSaveHandler($handler); } @@ -190,6 +199,10 @@ class NativeSessionStorage implements SessionStorageInterface return false; } + if (headers_sent()) { + return false; + } + if (null !== $lifetime) { ini_set('session.cookie_lifetime', $lifetime); } @@ -283,11 +296,6 @@ class NativeSessionStorage implements SessionStorageInterface return $this->bags[$name]; } - /** - * Sets the MetadataBag. - * - * @param MetadataBag $metaBag - */ public function setMetadataBag(MetadataBag $metaBag = null) { if (null === $metaBag) { @@ -327,12 +335,16 @@ class NativeSessionStorage implements SessionStorageInterface */ public function setOptions(array $options) { + if (headers_sent()) { + return; + } + $validOptions = array_flip(array( 'cache_limiter', 'cookie_domain', 'cookie_httponly', 'cookie_lifetime', 'cookie_path', 'cookie_secure', 'entropy_file', 'entropy_length', 'gc_divisor', 'gc_maxlifetime', 'gc_probability', 'hash_bits_per_character', - 'hash_function', 'name', 'referer_check', + 'hash_function', 'lazy_write', 'name', 'referer_check', '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', @@ -378,6 +390,10 @@ class NativeSessionStorage implements SessionStorageInterface throw new \InvalidArgumentException('Must be instance of AbstractProxy or NativeSessionHandler; implement \SessionHandlerInterface; or be null.'); } + if (headers_sent($file, $line)) { + throw new \RuntimeException(sprintf('Failed to set the session handler because headers have already been sent by "%s" at line %d.', $file, $line)); + } + // Wrap $saveHandler in proxy and prevent double wrapping of proxy if (!$saveHandler instanceof AbstractProxy && $saveHandler instanceof \SessionHandlerInterface) { $saveHandler = new SessionHandlerProxy($saveHandler); @@ -398,8 +414,6 @@ class NativeSessionStorage implements SessionStorageInterface * are set to (either PHP's internal, or a custom save handler set with session_set_save_handler()). * PHP takes the return value from the read() handler, unserializes it * and populates $_SESSION with the result automatically. - * - * @param array|null $session */ protected function loadSession(array &$session = null) { diff --git a/vendor/symfony/http-foundation/Session/Storage/Proxy/NativeProxy.php b/vendor/symfony/http-foundation/Session/Storage/Proxy/NativeProxy.php index 21ed1ada04..a0f48c1e27 100644 --- a/vendor/symfony/http-foundation/Session/Storage/Proxy/NativeProxy.php +++ b/vendor/symfony/http-foundation/Session/Storage/Proxy/NativeProxy.php @@ -12,7 +12,7 @@ namespace Symfony\Component\HttpFoundation\Session\Storage\Proxy; /** - * This proxy is built-in session handlers in PHP 5.3.x + * This proxy is built-in session handlers in PHP 5.3.x. * * @author Drak <drak@zikula.org> */ diff --git a/vendor/symfony/http-foundation/Session/Storage/Proxy/SessionHandlerProxy.php b/vendor/symfony/http-foundation/Session/Storage/Proxy/SessionHandlerProxy.php index be39f6baeb..a96aae265c 100644 --- a/vendor/symfony/http-foundation/Session/Storage/Proxy/SessionHandlerProxy.php +++ b/vendor/symfony/http-foundation/Session/Storage/Proxy/SessionHandlerProxy.php @@ -16,9 +16,6 @@ namespace Symfony\Component\HttpFoundation\Session\Storage\Proxy; */ class SessionHandlerProxy extends AbstractProxy implements \SessionHandlerInterface { - /** - * @var \SessionHandlerInterface - */ protected $handler; /** diff --git a/vendor/symfony/http-foundation/Session/Storage/SessionStorageInterface.php b/vendor/symfony/http-foundation/Session/Storage/SessionStorageInterface.php index 097583d5a5..66e8b33dd2 100644 --- a/vendor/symfony/http-foundation/Session/Storage/SessionStorageInterface.php +++ b/vendor/symfony/http-foundation/Session/Storage/SessionStorageInterface.php @@ -127,8 +127,6 @@ interface SessionStorageInterface /** * Registers a SessionBagInterface for use. - * - * @param SessionBagInterface $bag */ public function registerBag(SessionBagInterface $bag); |
