yellowtree / geoip-detect

Wordpress plugin "Geolocation IP Detection": Provides geographic information detected by an IP adress.
http://wordpress.org/plugins/geoip-detect/
GNU General Public License v3.0
161 stars 38 forks source link

Prefix Composer packages #191

Open benjaminpick opened 2 years ago

benjaminpick commented 2 years ago

https://developer.yoast.com/blog/safely-using-php-dependencies-in-the-wordpress-ecosystem/

benjaminpick commented 2 years ago

https://deliciousbrains.com/php-scoper-namespace-composer-depencies/#config

benjaminpick commented 2 years ago

https://dev.to/phpprefixer/new-tutorial-using-php-composer-in-the-wordpress-ecosystem-4bmp

benjaminpick commented 5 months ago

(Note from Diego, author of Aelia plugins)

For what concerns the namespacing of the dependency, I would suggest to use Mozart instead of PHP Scoper. It requires a simple configuration, which could be as simple as the following:

"mozart": { "dep_namespace": "YellowTree\Dependencies\", "dep_directory": "/dependencies/packages/", "classmap_directory": "/dependencies/classes/", "classmapprefix": "YellowTree", "packages": [ "geoip2/geoip2", "maxmind-db/reader", "maxmind/web-service-common" ], "delete_vendor_directories": true }