Skip to content

Commit 7ad76d2

Browse files
authored
Merge pull request #39 from ensi-platform/v7-ecs-310
ECS-310
2 parents 5dbbf7e + 72b0c7f commit 7ad76d2

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
@@ -127,6 +127,10 @@ public static function fromConfig(array $config): static
127127
$builder->setBasicAuthentication($config['username'], $config['password'] ?? '');
128128
}
129129

130+
if (filled($config['handler'] ?? null)) {
131+
$builder->setHandler(call_user_func_array($config['handler'], []));
132+
}
133+
130134
return new static($builder->build());
131135
}
132136
}

0 commit comments

Comments
 (0)