From 17d48fa051de7a3add71d4123bf77631691f4735 Mon Sep 17 00:00:00 2001 From: Pier-Paolo Mammi Date: Thu, 16 Jul 2026 12:50:37 +0200 Subject: [PATCH] fix deprecations on ElixFormsClient --- src/ElixForms/ElixFormsClient.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ElixForms/ElixFormsClient.php b/src/ElixForms/ElixFormsClient.php index b741032..83d7d21 100644 --- a/src/ElixForms/ElixFormsClient.php +++ b/src/ElixForms/ElixFormsClient.php @@ -11,7 +11,7 @@ class ElixFormsClient private string $baseUrl; private Client $httpClient; - public function __construct(string $baseUrl, Client $httpClient = null) + public function __construct(string $baseUrl, ?Client $httpClient) { $this->baseUrl = rtrim($baseUrl, '/'); $this->httpClient = $httpClient ?? new Client(['timeout' => 10.0, 'http_errors' => false]); @@ -22,7 +22,7 @@ class ElixFormsClient return new AuthClient($this->baseUrl, $this->httpClient); } - public function request(string $method, string $path, ?array $body = null, array $headers = []): array + public function request(string $method, string $path, ?array $body, array $headers = []): array { $url = $this->baseUrl . '/' . ltrim($path, '/'); $options = ['headers' => $headers];