elasticsearch-php
elasticsearch-php copied to clipboard
Change typehint for fromConfig in ClientBuilder
Hi,
I saw the issue (#1227) where an interface for the Client is added to support mocking in the unittest.
Maybe it is an idea to also let the ClientBuilder have the ClientInterface
as returntype instead of Client
.
https://github.com/elastic/elasticsearch-php/blob/9a734ac64798fe242d49a00d5f335c1cf45429c0/src/ClientBuilder.php#L158
Then it will be possible to Mock the ClientBuilder
and let fromConfig
return a mocked instance.