Skip to content

PHP 8.2 compatibility in Elasticsearch PHP client version 7 #1256

@asgrim

Description

@asgrim

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions