maxmind / GeoIP2-php

PHP API for GeoIP2 webservice client and database reader
https://maxmind.github.io/GeoIP2-php/
Apache License 2.0
2.3k stars 274 forks source link

Compatibility geoip2 with PHP v8.1 #209

Closed lexxai closed 1 year ago

lexxai commented 1 year ago

Deprecated: Return type of GeoIp2\Model\AbstractModel::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in www/wp-content/plugins/wp-statistics/includes/vendor/geoip2/geoip2/src/Model/AbstractModel.php on line 63

Deprecated: Return type of GeoIp2\Record\AbstractRecord::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in www/wp-content/plugins/wp-statistics/includes/vendor/geoip2/geoip2/src/Record/AbstractRecord.php on line 57

https://github.com/wp-statistics/wp-statistics/commit/dafbf2b72e33f1451568ecd24ad1e1fabeefc6cd

https://wordpress.org/support/topic/deprecated-errors-4/

oschwald commented 1 year ago

Can you confirm that this happens with 2.13.0? The linked code appears to be at least a few years out of date. I believe this has since been fixed.

lexxai commented 1 year ago

Can you confirm that this happens with 2.13.0? The linked code appears to be at least a few years out of date. I believe this has since been fixed.

2.13.0 - OK