diff options
Diffstat (limited to 'vendor/symfony/http-foundation')
6 files changed, 38 insertions, 11 deletions
diff --git a/vendor/symfony/http-foundation/ResponseHeaderBag.php b/vendor/symfony/http-foundation/ResponseHeaderBag.php index 11a859326b..e8a05ee68f 100644 --- a/vendor/symfony/http-foundation/ResponseHeaderBag.php +++ b/vendor/symfony/http-foundation/ResponseHeaderBag.php @@ -210,7 +210,7 @@ class ResponseHeaderBag extends HeaderBag * * @param string $format * - * @return array + * @return Cookie[] * * @throws \InvalidArgumentException When the $format is invalid */ diff --git a/vendor/symfony/http-foundation/Session/Session.php b/vendor/symfony/http-foundation/Session/Session.php index a46cffbb8d..f0379c1697 100644 --- a/vendor/symfony/http-foundation/Session/Session.php +++ b/vendor/symfony/http-foundation/Session/Session.php @@ -29,7 +29,7 @@ class Session implements SessionInterface, \IteratorAggregate, \Countable private $flashName; private $attributeName; private $data = array(); - private $hasBeenStarted; + private $usageIndex = 0; /** * @param SessionStorageInterface $storage A SessionStorageInterface instance @@ -54,6 +54,8 @@ class Session implements SessionInterface, \IteratorAggregate, \Countable */ public function start() { + ++$this->usageIndex; + return $this->storage->start(); } @@ -142,13 +144,13 @@ class Session implements SessionInterface, \IteratorAggregate, \Countable } /** - * @return bool + * @return int * * @internal */ - public function hasBeenStarted() + public function getUsageIndex() { - return $this->hasBeenStarted; + return $this->usageIndex; } /** @@ -158,6 +160,7 @@ class Session implements SessionInterface, \IteratorAggregate, \Countable */ public function isEmpty() { + ++$this->usageIndex; foreach ($this->data as &$data) { if (!empty($data)) { return false; @@ -182,6 +185,8 @@ class Session implements SessionInterface, \IteratorAggregate, \Countable */ public function migrate($destroy = false, $lifetime = null) { + ++$this->usageIndex; + return $this->storage->regenerate($destroy, $lifetime); } @@ -190,6 +195,8 @@ class Session implements SessionInterface, \IteratorAggregate, \Countable */ public function save() { + ++$this->usageIndex; + $this->storage->save(); } @@ -230,6 +237,8 @@ class Session implements SessionInterface, \IteratorAggregate, \Countable */ public function getMetadataBag() { + ++$this->usageIndex; + return $this->storage->getMetadataBag(); } @@ -238,7 +247,7 @@ class Session implements SessionInterface, \IteratorAggregate, \Countable */ public function registerBag(SessionBagInterface $bag) { - $this->storage->registerBag(new SessionBagProxy($bag, $this->data, $this->hasBeenStarted)); + $this->storage->registerBag(new SessionBagProxy($bag, $this->data, $this->usageIndex)); } /** diff --git a/vendor/symfony/http-foundation/Session/SessionBagProxy.php b/vendor/symfony/http-foundation/Session/SessionBagProxy.php index 307836d5f9..88005ee092 100644 --- a/vendor/symfony/http-foundation/Session/SessionBagProxy.php +++ b/vendor/symfony/http-foundation/Session/SessionBagProxy.php @@ -20,13 +20,13 @@ final class SessionBagProxy implements SessionBagInterface { private $bag; private $data; - private $hasBeenStarted; + private $usageIndex; - public function __construct(SessionBagInterface $bag, array &$data, &$hasBeenStarted) + public function __construct(SessionBagInterface $bag, array &$data, &$usageIndex) { $this->bag = $bag; $this->data = &$data; - $this->hasBeenStarted = &$hasBeenStarted; + $this->usageIndex = &$usageIndex; } /** @@ -34,6 +34,8 @@ final class SessionBagProxy implements SessionBagInterface */ public function getBag() { + ++$this->usageIndex; + return $this->bag; } @@ -42,6 +44,8 @@ final class SessionBagProxy implements SessionBagInterface */ public function isEmpty() { + ++$this->usageIndex; + return empty($this->data[$this->bag->getStorageKey()]); } @@ -58,7 +62,7 @@ final class SessionBagProxy implements SessionBagInterface */ public function initialize(array &$array) { - $this->hasBeenStarted = true; + ++$this->usageIndex; $this->data[$this->bag->getStorageKey()] = &$array; $this->bag->initialize($array); @@ -77,6 +81,8 @@ final class SessionBagProxy implements SessionBagInterface */ public function clear() { + ++$this->usageIndex; + return $this->bag->clear(); } } diff --git a/vendor/symfony/http-foundation/Tests/Fixtures/response-functional/common.inc b/vendor/symfony/http-foundation/Tests/Fixtures/response-functional/common.inc index ba101d3578..f9c40a9a3c 100644 --- a/vendor/symfony/http-foundation/Tests/Fixtures/response-functional/common.inc +++ b/vendor/symfony/http-foundation/Tests/Fixtures/response-functional/common.inc @@ -22,6 +22,10 @@ error_reporting(-1); ini_set('html_errors', 0); ini_set('display_errors', 1); +if (ini_get('xdebug.default_enable')) { + xdebug_disable(); +} + header_remove('X-Powered-By'); header('Content-Type: text/plain; charset=utf-8'); diff --git a/vendor/symfony/http-foundation/Tests/JsonResponseTest.php b/vendor/symfony/http-foundation/Tests/JsonResponseTest.php index 201839f89c..bd94a24505 100644 --- a/vendor/symfony/http-foundation/Tests/JsonResponseTest.php +++ b/vendor/symfony/http-foundation/Tests/JsonResponseTest.php @@ -16,6 +16,15 @@ use Symfony\Component\HttpFoundation\JsonResponse; class JsonResponseTest extends TestCase { + protected function setUp() + { + parent::setUp(); + + if (!defined('HHVM_VERSION')) { + $this->iniSet('serialize_precision', 14); + } + } + public function testConstructorEmptyCreatesJsonObject() { $response = new JsonResponse(); diff --git a/vendor/symfony/http-foundation/Tests/RequestTest.php b/vendor/symfony/http-foundation/Tests/RequestTest.php index 4266197ab2..9d4181fbc7 100644 --- a/vendor/symfony/http-foundation/Tests/RequestTest.php +++ b/vendor/symfony/http-foundation/Tests/RequestTest.php @@ -21,7 +21,6 @@ class RequestTest extends TestCase { protected function tearDown() { - // reset Request::setTrustedProxies(array(), -1); Request::setTrustedHosts(array()); } |
