fix deprecations on ElixFormsClient
This commit is contained in:
@@ -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];
|
||||
|
||||
Reference in New Issue
Block a user