elastic / elasticsearch-php

Official PHP client for Elasticsearch.
https://www.elastic.co/guide/en/elasticsearch/client/php-api/current/index.html
MIT License
35 stars 970 forks source link

Allow php 8.0+ #1159

Closed xvilo closed 2 years ago

xvilo commented 3 years ago

I would like to use the 5.x version with PHP 8. It already ran and installed fine with "php": "^7.4 || ^8.0". However upon removing ^7.4 || I can not install this package version anymore.

This intends fixing it

elasticmachine commented 3 years ago

Since this is a community submitted pull request, a Jenkins build has not been kicked off automatically. Can an Elastic organization member please verify the contents of this patch and then kick off a build manually?

mhkhung commented 3 years ago

At least 2 places in the code needs to be fixed:

RuntimeException: (errorno: 8192) Required parameter $transport follows optional parameter $params on line 98 in file .../vendor/elasticsearch/elasticsearch/src/Elasticsearch/Connections/ConnectionInterface.php

RuntimeException: (errorno: 8192) Required parameter $connectionPool follows optional parameter $sniffOnStart on line 51 in file .../vendor/elasticsearch/elasticsearch/src/Elasticsearch/Transport.php

ezimuel commented 2 years ago

@xvilo I'm sorry but we are not supporting anymore 5.x. We still support 6.8.x as minimum version.