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 Version Support #1083

Closed
reedy opened this issue Dec 1, 2020 · 17 comments
Closed

PHP Version Support #1083

reedy opened this issue Dec 1, 2020 · 17 comments

Comments

@reedy
Copy link
Contributor

reedy commented Dec 1, 2020

Hello!

I'd like to request an update/clarification to https://github.com/elastic/elasticsearch-php#php-version-requirement about the PHP versions supported.

Screenshot 2020-12-01 at 13 20 21

The table doesn't use semver (and it shouldn't necessarily), but >= 7.0.0 and >= 7.1.0 would suggest to me that ES-PHP 6.0 and 7.0 technically support PHP 8.0, (which is obviously out now as a stable release!) but it doesn't, and can be confirmed by looking at https://github.com/elastic/elasticsearch-php/blob/6.x/composer.json#L16 which as ^7.0 and https://github.com/elastic/elasticsearch-php/blob/7.x/composer.json#L16 which has ^7.1. And ^7.0 basically means >=7.0.0 <8.0.0 etc.

Anything we can do for clarification? As I'm sure there are going to be people coming along and thinking PHP 8 should work...

Thanks!

@Radiergummi
Copy link

Most probably, it will be enough to update the version requirement to >=7.1|^8.0 and release a patch for it.

@ezimuel
Copy link
Contributor

ezimuel commented Dec 16, 2020

@reedy when you read PHP >= 7.1.0 this means the minimum PHP requirement, until the next major. I'll improve the table in the README.md to be more clear. If you have any suggestion you can send a PR, thanks!

@reedy
Copy link
Contributor Author

reedy commented Dec 16, 2020

Like I say, if it was semver syntax, I'd agree. But 8.0.0 >= 7.1.0... And many projects are using basically that syntax in their composer.json to include support for PHP 8.0

@ezimuel
Copy link
Contributor

ezimuel commented Dec 17, 2020

PHP Version Requirement

Version 7.x can be used starting from PHP version 7.1. In addition, it requires the native JSON
extension to be version 1.3.7 or higher.

PHP 8 is supported starting from elasticsearch-php 7.11.

Elasticsearch-PHP Branch PHP Version
>= 7.11.0, < 8.0.0 >= 7.1.0, < 9.0.0
>= 7.0.0, < 7.11.0 >= 7.1.0, < 8.0.0
6.x >= 7.0.0, < 8.0.0
5.x >= 5.6.6, < 8.0.0
2.x >= 5.4.0, < 7.0.0
0.4, 1.x >= 5.3.9, < 7.0.0

@reedy, @Radiergummi is this matrix version more clear?

@Radiergummi
Copy link

@ezimuel that looks clear as day, thank you! I originally implied that PHP 8 support should simply be granted for the 7.x branch (given that it technically only requires a patch and wouldn't have to be explicitly listed), but then again I'm not involved with the project yet. So 7.11 it is :)

@ezimuel
Copy link
Contributor

ezimuel commented Dec 17, 2020

@Radiergummi Since each elasticsearch-php 7.y client works with all the 7.x Elasticsearch versions where x <= y, I don't need to backport the change for PHP 8 in the previous client versions.

@dakorpar
Copy link

dakorpar commented Jan 5, 2021

any ETA on 7.11 release?

@ezimuel
Copy link
Contributor

ezimuel commented Jan 14, 2021

We are going to release 7.11 soon, it should happen this month.

@volkv
Copy link

volkv commented Jan 27, 2021

We are going to release 7.11 soon, it should happen this month.

We still really hope so :)
Thanks!

@adithyasrinivasan
Copy link

Sorry to be that person, but any luck?

I'm waiting on support for PHP8 so other libraries that arbeitnow uses can update to it :)

Thanks!

@ezimuel
Copy link
Contributor

ezimuel commented Feb 5, 2021

@adithyasrinivasan, @volkv we are going to release 7.11 it very soon! Unfortunately, we had some delay.

@ezimuel
Copy link
Contributor

ezimuel commented Feb 11, 2021

I just released elaticsearch-php 7.11.0 that supports PHP 8.

@adithyasrinivasan
Copy link

Thanks @ezimuel - appreciate it, can't wait to upgrade!

@ezimuel
Copy link
Contributor

ezimuel commented Feb 11, 2021

Thanks to all the contributors!

@fghamsary
Copy link

fghamsary commented May 18, 2021

We are still using v6.7.2 because of compatibility issue in our application, but this version is not compatible with PHP 8.
I'm doing some tests and I'll create a PullRequest as soon as I've corrected the couple problems which are in the code.
I've already forked and started the work, if anybody else is interested:
https://github.com/fghamsary/elasticsearch-php

Here is the pull request, I just created:
#1144

@xvilo
Copy link

xvilo commented Aug 26, 2021

I am in the same boat as @fghamsary, but then with 5.x. I works fine here and I created #1159

@ezimuel
Copy link
Contributor

ezimuel commented Jan 27, 2022

@fghamsary and @xvilo you can update to v6.8 that is compatible with PHP 8.

@ezimuel ezimuel closed this as completed Jan 27, 2022
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

8 participants