Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHP 8.2 compatibility in Elasticsearch PHP client version 7 #1256

Closed
asgrim opened this issue Sep 28, 2022 · 2 comments
Closed

PHP 8.2 compatibility in Elasticsearch PHP client version 7 #1256

asgrim opened this issue Sep 28, 2022 · 2 comments

Comments

@asgrim
Copy link

asgrim commented Sep 28, 2022

Summary of problem or feature request

Elasticsearch PHP client claims it is compatible with PHP 8.2:

"php": "^7.3 || ^8.0",

When installing elasticsearch/elasticsearch:^7.0 running PHP 8.2.0RC2 and making some requests, I get the following deprecation warning:

Deprecated: Creation of dynamic property GuzzleHttp\Ring\Client\CurlMultiHandler::$_mh is deprecated in /tmp/scout_elastic_test/vendor/ezimuel/ringphp/src/Client/CurlMultiHandler.php on line 47

I have submitted an upstream patch ezimuel/ringphp#7 which should fix the above, but I'm not sure if it has been noticed yet.

From my basic checks, it otherwise seems compatible.

Code snippet of problem

Our full test for ES7 compatibility is here.

$client = \Elasticsearch\ClientBuilder::create()->build();

$client->index(['index' => 'my_index', 'id' => 'my_id', 'body' => ['testField' => 'abc']]);
$client->get(['index' => 'my_index', 'id' => 'my_id']);
$client->search(['index' => 'my_index', 'body' => ['query' => ['match' => ['testField' => 'abc']]]]);
$client->delete(['index' => 'my_index', 'id' => 'my_id']);

System details

  • Operating System - Linux
  • PHP Version - 8.2.0RC2
  • ES-PHP client version - 7.17.0
  • Elasticsearch version - 8.1.2
@ezimuel
Copy link
Contributor

ezimuel commented Oct 4, 2022

@asgrim thanks for the PR, I'll check asap.

@asgrim
Copy link
Author

asgrim commented Oct 31, 2022

Please note I also made a follow-up bugfix ezimuel/ringphp#9 not sure if you saw yet 👍

@ezimuel ezimuel closed this as completed May 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants