elasticsearch-php icon indicating copy to clipboard operation
elasticsearch-php copied to clipboard

PHP 8.4 Deprecations in ClientBuilder

Open TimWolla opened this issue 1 year ago • 0 comments

Using elasticsearch-php in PHP 8.4 emits 3 deprecation notices when loading ClientBuilder, due to the https://wiki.php.net/rfc/deprecate-implicitly-nullable-types RFC:

Deprecated: Elastic\Elasticsearch\ClientBuilder::setApiKey(): Implicitly marking parameter $id as nullable is deprecated, the explicit nullable type must be used instead in src/ClientBuilder.php on line 229

Deprecated: Elastic\Elasticsearch\ClientBuilder::setSSLCert(): Implicitly marking parameter $password as nullable is deprecated, the explicit nullable type must be used instead in src/ClientBuilder.php on line 275

Deprecated: Elastic\Elasticsearch\ClientBuilder::setSSLKey(): Implicitly marking parameter $password as nullable is deprecated, the explicit nullable type must be used instead in src/ClientBuilder.php on line 298

As far as I can tell there are no other issues with elasticsearch-php itself when running the test suite using PHP 8.4. Only the php-http/mock-client dependency reports a similar deprecation.

TimWolla avatar Sep 13 '24 07:09 TimWolla