geocoder-php / Geocoder

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

Add PHP 8.1 support by specifying return types for `getIterator` and `count` #1142

Closed ruudk closed 2 years ago

ruudk commented 2 years ago

@jbelien Would be great to have this merged to allow people to run Geocoder on PHP 8.1 that is expected to be released next week. 🙏

jbelien commented 2 years ago

Thank you for your contribution @ruudk.

Could you explain why support for PHP8.1 requires updating AddressCollection.php and AdminLevelCollection.php ? Thanks.

ruudk commented 2 years ago

Because PHP 8.1 adds return types and parameter types for almost all built in interfaces and functions.

jbelien commented 2 years ago

Ping me again when PHP8.1 is released, I'll merge this then.

ruudk commented 2 years ago

It can already be merged as these changes are backwards compatible. PHP 8.1 Will be released next week :)

ruudk commented 2 years ago

Can this be merged please? :)

ruudk commented 2 years ago

Thanks, can it also be tagged?