geoip-detect icon indicating copy to clipboard operation
geoip-detect copied to clipboard

Starting to explore Maxmind API decoupling (Signature clashes)

Open benjaminpick opened this issue 4 years ago • 1 comments

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/

benjaminpick avatar Mar 03 '21 10:03 benjaminpick

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/

benjaminpick avatar Mar 08 '21 09:03 benjaminpick