mirror of
https://github.com/Vateron-Media/XC_VM.git
synced 2026-10-11 04:02:41 +02:00
Switch GeoIP/ISP lookups from the native maxminddb C extension to the pure-PHP maxmind-db/reader, pulled in via geoip2/geoip2. This removes a compiled-extension runtime dependency — the panel now works on any stock PHP 8.1+ without building or installing maxminddb.so. Dependencies: - Add geoip2/geoip2 ~3.0 (brings maxmind-db/reader, maxmind/web-service-common) - Rebuild committed vendor/ with `composer install --no-dev` (production-only) Code fixes: - Resolve MaxMind\Db\Reader against the global namespace (leading backslash) in namespaced classes — `new MaxMind\Db\Reader(...)` previously resolved to a non-existent XcVm\...\MaxMind\Db\Reader and would fatal once the extension was gone. Fixed in GeoIPService, ResellerApiDispatcher, admin/api.php view. - Update GeoIP util docblock to reflect the Composer-based source. Installer / runtime cleanup: - bin/php/lib/php.ini: comment out `extension=maxminddb.so` - install (main installer) and LbInstallFlow: drop libmaxminddb0/-dev, libmaxminddb/-devel and the now-unused mmdb-bin from all distro package lists (Debian/Ubuntu/RHEL) Behavior, the raw `->get()` array format and the on-disk GeoIP file cache are unchanged; legacy libGeoIP packages are left untouched.
38 lines
1.4 KiB
JSON
38 lines
1.4 KiB
JSON
{
|
|
"name": "vateron-media/xc-vm",
|
|
"description": "XC_VM IPTV panel — Composer autoloader (PSR-4) deployed as /home/xc_vm/. Regenerate with `composer dump-autoload` from this directory; never run `composer install` on the deploy path (vendor/ is committed and shipped).",
|
|
"type": "project",
|
|
"license": "AGPL-3.0-or-later",
|
|
"require": {
|
|
"php": ">=8.1",
|
|
"gemorroj/m3u-parser": "6.0.1",
|
|
"chrisyue/php-m3u8": "^4",
|
|
"mobiledetect/mobiledetectlib": "^4.9",
|
|
"geoip2/geoip2": "~3.0"
|
|
},
|
|
"require-dev": {
|
|
"phpstan/phpstan": "2.1.17",
|
|
"friendsofphp/php-cs-fixer": "^3.95"
|
|
},
|
|
"autoload": {
|
|
"psr-4": {
|
|
"XcVm\\": "./"
|
|
}
|
|
},
|
|
"config": {
|
|
"optimize-autoloader": false,
|
|
"classmap-authoritative": false,
|
|
"platform": {
|
|
"php": "8.1.33"
|
|
}
|
|
},
|
|
"scripts": {
|
|
"post-install-cmd": [
|
|
"@php -r \"fwrite(STDERR, \\\"[xc_vm] NOTE: vendor/ is committed and shipped. Use 'composer dump-autoload' to regenerate; do not run 'composer install' on the deploy path.\\n\\\");\""
|
|
],
|
|
"post-update-cmd": [
|
|
"@php -r \"fwrite(STDERR, \\\"[xc_vm] NOTE: vendor/ + composer.lock are committed. After changing deps, commit composer.lock and re-commit a PRODUCTION-only vendor: composer install --no-dev.\\n\\\");\""
|
|
]
|
|
}
|
|
}
|