geoip-detect
geoip-detect copied to clipboard
Starting to explore Maxmind API decoupling (Signature clashes)
I don't want to extend Maxmind classes anymore (or as less as possible/reasonable), instead wrapping them with my own types.
- [ ] My readers should always return my City model
- [ ] This means, the Maxmind Reader class in manual.php needs to be wrapped
- [ ] Can the model stay extended?
Reason: PHP 7 Typing is helpful, but when different plugins use different versions of the Maxmind library, everything goes downhill. See https://wordpress.org/support/topic/maxmind-lib-incompabilities-meta-ticket/
I guess long-term we will need to use something like php-scoper... https://developer.yoast.com/blog/safely-using-php-dependencies-in-the-wordpress-ecosystem/