From d6a0f67a682a1fba7b9eb37ded4567e397164bfc Mon Sep 17 00:00:00 2001 From: hsldymq Date: Fri, 27 Sep 2024 16:03:51 +0800 Subject: [PATCH] fix: dynamic property declaration cause warning in php 8.2+ --- src/Context/Cookie.php | 1 + src/Http/Request.php | 4 +--- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/Context/Cookie.php b/src/Context/Cookie.php index 3b0af60..408a0bf 100644 --- a/src/Context/Cookie.php +++ b/src/Context/Cookie.php @@ -42,6 +42,7 @@ class Cookie extends BaseContext { + public $salt = null; protected $data; protected $response; diff --git a/src/Http/Request.php b/src/Http/Request.php index 06ac70f..767d76f 100644 --- a/src/Http/Request.php +++ b/src/Http/Request.php @@ -5,9 +5,6 @@ use Psr\Http\Message\ServerRequestInterface; use Psr\Http\Message\UriInterface; -/** - * @property array $server - */ class Request implements ServerRequestInterface { use MessageTrait; @@ -15,6 +12,7 @@ class Request implements ServerRequestInterface /** @var callable */ private $client_ip_extractor = null; + public $server; protected $get; protected $post; protected $cookies;