geocoder-php / Geocoder

The most featured Geocoder library written in PHP.
https://geocoder-php.org
MIT License
3.94k stars 517 forks source link

Support for PHP 8.0 #1093

Closed ildyria closed 3 years ago

ildyria commented 3 years ago

Currently Geocoder is only supporting php 7.2 and higher as seen in composer.json.

    "require": {
        "php": "^7.2",

Would it be possible to additionally enable support for php 8.0 which [will be/has been] released on November 26th, 2020 ?

jbelien commented 3 years ago

Excellent idea ! I'll test and make the update once PHP 8.0 is officially released (announced for later today).

jbelien commented 3 years ago

Apparently PHP 8.0 is not yet available in TravisCI : https://travis-ci.org/github/geocoder-php/Geocoder/builds/746552201 I'll try again in a few days!

ildyria commented 3 years ago

At LycheeOrg we got limited by the credits system on TravisCI (docker was taking a lot of time to build) so we migrated to Github actions. I have to say, this option is significantly faster than Travis builds.

ildyria commented 3 years ago

I spent a few hours setting up GitHub actions as it provides PHP 8.0 (https://github.com/ildyria/Geocoder/tree/add-github-actions)

Unfortunately, simply changing the composer file to also accept php 8.0 is not enough as some dependencies do not accept PHP 8: https://github.com/ildyria/Geocoder/runs/1470099431?check_suite_focus=true

jbelien commented 3 years ago

Awesome, thanks for the information @ildyria 👍

jbelien commented 3 years ago

Travis CI has been updated and now PHP 8.0 is available. As you noticed, we need support for PHP 8.0 on php-http/curl-client (https://travis-ci.org/github/geocoder-php/Geocoder/jobs/746552203#L299).

ildyria commented 3 years ago

Yes, I know: https://github.com/php-http/curl-client/issues/68

ildyria commented 3 years ago

Pull request on the Curl-client side: https://github.com/php-http/curl-client/pull/71

mruz commented 3 years ago

Curl-client has been updated. @jbelien can you open a PR to check if php8 branch passes?

jbelien commented 3 years ago

I'm having a look this week 👍 I'll have to "upgrade" geocoder-php/provider-integration-tests. I'm working on it.

jbelien commented 3 years ago

PR is ready and waiting for review : https://github.com/geocoder-php/provider-integration-tests/pull/17

jbelien commented 3 years ago

PR #1102 is ready and waiting for review 🚀

jbelien commented 3 years ago

It will need a bit more work to fully support PHP 8.0.

jbelien commented 3 years ago

It will (still) need a bit more work to fully support PHP 8.0.

jbelien commented 3 years ago

All (official) providers and components have got a new release and are now supporting PHP 8.0 !

Merry Christmas everyone ! 🎅

mikebronner commented 3 years ago

That is awesome! Thanks @jbelien. Will there be a new release of the main package as well in the near future, or does that still require more work?

jbelien commented 3 years ago

Will there be a new release of the main package as well in the near future, or does that still require more work?

@mikebronner All packages already have a new release including our main package willdurand/geocoder.

If you're asking about a new release of this repository, I just released it but AFAIK there is no package linked to our main repository.