Explorer icon indicating copy to clipboard operation
Explorer copied to clipboard

Elasticsearch ^8.0 support

Open jayjfletcher opened this issue 10 months ago • 3 comments

This pull request contains breaking changes.

Elasticsearch 8.x introduced many breaking changes to the client. It seems to have been a complete overhaul.

8.x also introduced the ClientInterface so there is no longer a need for the following files:

  • src/Infrastructure/Elastic/ElasticClientFactory.php - removed
  • src/Infrastructure/Elastic/ElasticClientBuilder.php- removed

and associated tests:

  • tests/Unit/ElasticClientBuilderTest.php - removed
  • tests/Unit/ElasticClientFactoryTest.php - removed

Client can now be injected via ClientInterface so ElasticClientBuilder was replaced with Elastic's native ClientBuilder and documentation has been updated to reflect this.

jayjfletcher avatar Apr 07 '24 04:04 jayjfletcher

Whoah, you have put in a good amount of work! Thanks, I have approved the CI actions to run and give you some feedback and I will review the code asap.

Jeroen-G avatar Apr 07 '24 15:04 Jeroen-G

Re: the CI failures, check out the Makefile which can possibly fix the codestyle (and run the tests etc.) for you.

Jeroen-G avatar Apr 08 '24 15:04 Jeroen-G

@Jeroen-G I have been working on updating this PR to get 8.x into the lib. A few things related to CI, looks like there will need to be an update to a fair bit more as the Client class is the correct class to use, since ClientInterface doesn't have all the correct methods and static analysis. the Client class is now marked as final so as ES suggests the tests will have to be updated to mock the underlying HTTP requests instead of their Client class.

Long story short, would you rather I create a PR into this PR, or just have a fresh PR (with these initial changes in it and the new adjustments)?

sporchia avatar Jul 18 '24 16:07 sporchia