Skip to content

Commit d10a458

Browse files
committed
feat(connection): add client info retrieval and improved error handling
- Introduced `getClientInfo` method to retrieve Elasticsearch client information. - Added `AuthenticationException` for better error handling during connection build. - Configured connection name dynamically instead of hardcoding. - Enhanced docstrings for connection validation and builder options. - Implemented new tests for prefix handling and client info retrieval. - Refactored existing tests to use `expect` instead of `$this->assertInstanceOf`. Who needs a crystal ball when you have comprehensive client info? 🔮
1 parent 8a1967e commit d10a458

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/Connection.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -288,20 +288,20 @@ private function _sanitizeConfig(): void
288288
'api_key' => null,
289289
'api_id' => null,
290290
'index_prefix' => null,
291-
'ssl_cert' => null,
292291
'options' => [
293-
'allow_id_sort' => null,
294-
'ssl_verification' => null,
292+
'allow_id_sort' => false,
293+
'ssl_verification' => true,
295294
'retires' => null,
296-
'error_log_index' => null,
297295
'meta_header' => null,
298296
],
297+
'ssl_cert' => null,
299298
'ssl' => [
300299
'key' => null,
301-
'password' => null,
300+
'key_password' => null,
302301
'cert' => null,
303302
'cert_password' => null,
304303
],
304+
'error_log_index' => false,
305305
],
306306
$this->config
307307
);

0 commit comments

Comments
 (0)