From 3323568bdf5fe4c7428627452341386e67cbc7b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Jac=C3=ADk?= Date: Tue, 26 Nov 2024 16:58:20 +0100 Subject: [PATCH] Make Rfc6455Connector compatible with PHP 8.4 Fixes this error: ``` Deprecated: Amp\Websocket\Client\Rfc6455Connector::__construct(): Implicitly marking parameter $httpClient as nullable is deprecated, the explicit nullable type must be used instead in src/Rfc6455Connector.php on line 32 ``` --- src/Rfc6455Connector.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Rfc6455Connector.php b/src/Rfc6455Connector.php index 5bf0a22..80976f5 100644 --- a/src/Rfc6455Connector.php +++ b/src/Rfc6455Connector.php @@ -31,7 +31,7 @@ final class Rfc6455Connector implements WebsocketConnector */ public function __construct( private readonly WebsocketConnectionFactory $connectionFactory = new Rfc6455ConnectionFactory(), - HttpClient $httpClient = null, + ?HttpClient $httpClient = null, private readonly ?WebsocketCompressionContextFactory $compressionContextFactory = new Rfc7692CompressionFactory(), ) { $this->httpClient = $httpClient