We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 73bcc91 commit 25b8e5eCopy full SHA for 25b8e5e
src/ElasticClient.php
@@ -157,13 +157,8 @@ public static function fromConfig(array $config): static
157
$builder->setBasicAuthentication($username, $password);
158
}
159
160
- if (filled($config['http_client'] ?? null)) {
161
- $httpClient = call_user_func_array($config['http_client'], []);
162
-
163
- $client = new $httpClient['class']();
164
165
- $builder->setHttpClient($client);
166
- $builder->setHttpClientOptions($httpClient['options']);
+ if (filled($config['handler'] ?? null)) {
+ $builder->setHandler(call_user_func_array($config['handler'], []));
167
168
169
return new static($builder->build());
0 commit comments