From f94a528a28b220abed9d9403e1a801581851da8c Mon Sep 17 00:00:00 2001 From: Bilge Date: Sat, 23 Nov 2024 14:35:17 +0000 Subject: [PATCH] Added support for PHP 8.4. --- .github/workflows/ci.yml | 3 +++ src/Cookie/ResponseCookie.php | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f5d666b..6a2b858 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,6 +15,9 @@ jobs: - operating-system: 'ubuntu-latest' php-version: '8.2' + - operating-system: 'ubuntu-latest' + php-version: '8.4' + - operating-system: 'windows-latest' php-version: '8.1' job-description: 'on Windows' diff --git a/src/Cookie/ResponseCookie.php b/src/Cookie/ResponseCookie.php index 1c284c8..2d708fe 100644 --- a/src/Cookie/ResponseCookie.php +++ b/src/Cookie/ResponseCookie.php @@ -158,14 +158,14 @@ private static function parseDate(string $date): ?\DateTimeImmutable /** * @param non-empty-string $name Name of the cookie. * @param string $value Value of the cookie. - * @param CookieAttributes $attributes Attributes of the cookie. + * @param CookieAttributes|null $attributes Attributes of the cookie. * * @throws InvalidCookieException If name or value is invalid. */ public function __construct( private string $name, private string $value = '', - CookieAttributes $attributes = null, + ?CookieAttributes $attributes = null, ) { if (!\preg_match(self::NAME_REGEX, $name)) { throw new InvalidCookieException("Invalid cookie name: '{$name}'");