Skip to content

Commit 124195e

Browse files
authored
Merge pull request #40 from ensi-platform/v8-ecs-310
ECS-310
2 parents 138100d + cd78254 commit 124195e

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

config/config.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,6 @@
1111
'username' => env('ELASTICSEARCH_USERNAME', ''),
1212
'password' => env('ELASTICSEARCH_PASSWORD', ''),
1313
'ssl_verification' => env('ELASTICSEARCH_SSL_VERIFICATION', false),
14+
'handler' => null, // for call_user_func_array
1415
],
1516
];

src/ElasticClient.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,10 @@ public static function fromConfig(array $config): static
157157
$builder->setBasicAuthentication($username, $password);
158158
}
159159

160+
if (filled($config['handler'] ?? null)) {
161+
$builder->setHandler(call_user_func_array($config['handler'], []));
162+
}
163+
160164
return new static($builder->build());
161165
}
162166

0 commit comments

Comments
 (0)