From f97736e184f2a22cdb1bac35193a461c3216beff Mon Sep 17 00:00:00 2001 From: hedali <1455885920@qq.com> Date: Thu, 7 Nov 2024 16:04:43 +0800 Subject: [PATCH] php8.2 fixed bug Deprecated: Creation of dynamic property PHPSocketIO\Engine\Protocols\Http\Request::$res is deprecated Deprecated: Creation of dynamic property PHPSocketIO\Engine\Transports\PollingXHR::$sid is deprecated Deprecated: Creation of dynamic property PHPSocketIO\Engine\Protocols\Http\Request::$cleanup Deprecated: Creation of dynamic property PHPSocketIO\Socket::$addedUser is deprecated Deprecated: Creation of dynamic property PHPSocketIO\Socket::$username is deprecated --- src/Engine/Protocols/Http/Request.php | 4 ++++ src/Engine/Transports/PollingXHR.php | 2 ++ src/Socket.php | 3 +++ 3 files changed, 9 insertions(+) diff --git a/src/Engine/Protocols/Http/Request.php b/src/Engine/Protocols/Http/Request.php index c908696..6326eea 100644 --- a/src/Engine/Protocols/Http/Request.php +++ b/src/Engine/Protocols/Http/Request.php @@ -24,6 +24,10 @@ class Request public $_query = null; + public $res = null; + + public $cleanup = null; + public function __construct($connection, $raw_head) { $this->connection = $connection; diff --git a/src/Engine/Transports/PollingXHR.php b/src/Engine/Transports/PollingXHR.php index 7ce3ecc..c43f90f 100644 --- a/src/Engine/Transports/PollingXHR.php +++ b/src/Engine/Transports/PollingXHR.php @@ -6,6 +6,8 @@ class PollingXHR extends Polling { + public $sid = null; + public function __construct() { Debug::debug('PollingXHR __construct'); diff --git a/src/Socket.php b/src/Socket.php index 12870c6..be1d69c 100644 --- a/src/Socket.php +++ b/src/Socket.php @@ -26,6 +26,9 @@ class Socket extends Emitter public $handshake = []; public $userId = null; public $isGuest = false; + public $addedUser = null; + public $username = null; + public static $events = [ 'error' => 'error',