Update composer dependencies

This commit is contained in:
Chris
2019-06-11 12:29:32 +01:00
parent 7d6df3843b
commit 1f608b1c21
1835 changed files with 74500 additions and 27482 deletions

View File

@@ -29,6 +29,7 @@ class Cookie
private $sameSite;
private $secureDefault = false;
const SAMESITE_NONE = 'none';
const SAMESITE_LAX = 'lax';
const SAMESITE_STRICT = 'strict';
@@ -42,7 +43,7 @@ class Cookie
*/
public static function fromString($cookie, $decode = false)
{
$data = array(
$data = [
'expires' => 0,
'path' => '/',
'domain' => null,
@@ -50,7 +51,7 @@ class Cookie
'httponly' => false,
'raw' => !$decode,
'samesite' => null,
);
];
$parts = HeaderUtils::split($cookie, ';=');
$part = array_shift($parts);
@@ -126,7 +127,7 @@ class Cookie
$sameSite = strtolower($sameSite);
}
if (!\in_array($sameSite, array(self::SAMESITE_LAX, self::SAMESITE_STRICT, null), true)) {
if (!\in_array($sameSite, [self::SAMESITE_LAX, self::SAMESITE_STRICT, self::SAMESITE_NONE, null], true)) {
throw new \InvalidArgumentException('The "sameSite" parameter value is not valid.');
}