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 87e433d commit 73bcc91Copy full SHA for 73bcc91
src/ElasticClient.php
@@ -157,8 +157,13 @@ public static function fromConfig(array $config): static
157
$builder->setBasicAuthentication($username, $password);
158
}
159
160
- if (filled($config['handler'] ?? null)) {
161
- $builder->setHandler(call_user_func_array($config['handler'], []));
+ if (filled($config['http_client'] ?? null)) {
+ $httpClient = call_user_func_array($config['http_client'], []);
162
+
163
+ $client = new $httpClient['class']();
164
165
+ $builder->setHttpClient($client);
166
+ $builder->setHttpClientOptions($httpClient['options']);
167
168
169
return new static($builder->build());
0 commit comments