fix deprecations on ElixFormsClient

This commit is contained in:
2026-07-16 12:50:37 +02:00
parent 62036b3f0e
commit 17d48fa051
+2 -2
View File
@@ -11,7 +11,7 @@ class ElixFormsClient
private string $baseUrl; private string $baseUrl;
private Client $httpClient; private Client $httpClient;
public function __construct(string $baseUrl, Client $httpClient = null) public function __construct(string $baseUrl, ?Client $httpClient)
{ {
$this->baseUrl = rtrim($baseUrl, '/'); $this->baseUrl = rtrim($baseUrl, '/');
$this->httpClient = $httpClient ?? new Client(['timeout' => 10.0, 'http_errors' => false]); $this->httpClient = $httpClient ?? new Client(['timeout' => 10.0, 'http_errors' => false]);
@@ -22,7 +22,7 @@ class ElixFormsClient
return new AuthClient($this->baseUrl, $this->httpClient); 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, '/'); $url = $this->baseUrl . '/' . ltrim($path, '/');
$options = ['headers' => $headers]; $options = ['headers' => $headers];