From 3a4fd70cc8489e34bc71ddf105ba6c8d28ce4b4d Mon Sep 17 00:00:00 2001 From: Tom Arbesser-Rastburg Date: Thu, 24 Apr 2025 10:27:23 +1000 Subject: [PATCH] Fix PHP 8.4 deprecation warnings In PHP 8.4 and above, nullable arguments need to be explicitly marked as such when providing a typehint. This can either be done by using the ? operator or by adding "null" to the typehint through a union type. This PR addresses this, fixing deprecation warnings emitted by PHP 8.4. --- src/Client.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Client.php b/src/Client.php index 9d8d2dd..be3d41b 100644 --- a/src/Client.php +++ b/src/Client.php @@ -65,9 +65,9 @@ public function __construct( string $endpointUrl, array $authorizationHeaders = [], array $httpOptions = [], - ClientInterface $httpClient = null, + ?ClientInterface $httpClient = null, string $requestMethod = 'POST', - AuthInterface $auth = null + ?AuthInterface $auth = null ) { $headers = array_merge( $authorizationHeaders,