N°8910 - Upgrade Symfony packages

This commit is contained in:
Benjamin Dalsass
2026-02-19 09:18:56 +01:00
committed by GitHub
parent d5706fcbef
commit d2f67dcb3c
126 changed files with 1107 additions and 2067 deletions

View File

@@ -174,7 +174,7 @@ class ResponseHeaderBag extends HeaderBag
*/
public function setCookie(Cookie $cookie)
{
$this->cookies[$cookie->getDomain()][$cookie->getPath()][$cookie->getName()] = $cookie;
$this->cookies[$cookie->getDomain() ?? ''][$cookie->getPath()][$cookie->getName()] = $cookie;
$this->headerNames['set-cookie'] = 'Set-Cookie';
}
@@ -187,13 +187,13 @@ class ResponseHeaderBag extends HeaderBag
{
$path ??= '/';
unset($this->cookies[$domain][$path][$name]);
unset($this->cookies[$domain ?? ''][$path][$name]);
if (empty($this->cookies[$domain][$path])) {
unset($this->cookies[$domain][$path]);
if (empty($this->cookies[$domain ?? ''][$path])) {
unset($this->cookies[$domain ?? ''][$path]);
if (empty($this->cookies[$domain])) {
unset($this->cookies[$domain]);
if (empty($this->cookies[$domain ?? ''])) {
unset($this->cookies[$domain ?? '']);
}
}
@@ -212,7 +212,7 @@ class ResponseHeaderBag extends HeaderBag
public function getCookies(string $format = self::COOKIES_FLAT): array
{
if (!\in_array($format, [self::COOKIES_FLAT, self::COOKIES_ARRAY])) {
throw new \InvalidArgumentException(sprintf('Format "%s" invalid (%s).', $format, implode(', ', [self::COOKIES_FLAT, self::COOKIES_ARRAY])));
throw new \InvalidArgumentException(\sprintf('Format "%s" invalid (%s).', $format, implode(', ', [self::COOKIES_FLAT, self::COOKIES_ARRAY])));
}
if (self::COOKIES_ARRAY === $format) {
@@ -240,7 +240,7 @@ class ResponseHeaderBag extends HeaderBag
*/
public function clearCookie(string $name, ?string $path = '/', ?string $domain = null, bool $secure = false, bool $httpOnly = true, ?string $sameSite = null /* , bool $partitioned = false */)
{
$partitioned = 6 < \func_num_args() ? \func_get_arg(6) : false;
$partitioned = 6 < \func_num_args() ? func_get_arg(6) : false;
$this->setCookie(new Cookie($name, null, 1, $path, $domain, $secure, $httpOnly, false, $sameSite, $partitioned));
}