huluti/geoip2-bundle
Symfony bundle for MaxMind GeoIP2 that resolves IP addresses to geographic data such as country, city, and coordinates using local databases, with service integration for looking up visitor locations in applications.
geoip2/geoip2 (MaxMind's official PHP reader). The real build-vs-buy decision is MaxMind database vs. a hosted IP-intelligence API — the bundle itself is a few hundred lines of Symfony config, so the switching cost is low in either direction. The 3.0.0 release does not change that calculus: it is a maintenance release (PHP 8.4/8.5 support, legacy PHP/Symfony dropped, GeoIP v2 support removed, PHPUnit/PHPStan upgrades), not a capability release.geoip2/geoip2 directly behind our own thin service," not "adopt a bundle."Consider it if:
.mmdb file and are comfortable managing database downloads/refreshes ourselves.Look elsewhere if:
geoip2/geoip2 directly in a service provider, or evaluate torann/geoip / stevebauman/location if we want Laravel-native facades and multi-driver support.composer update is effectively a code review we do ourselves. Note also that this is a fork of gpslab/geoip2, i.e. the project has already changed hands once. A version 3.0.0 with PHPUnit/PHPStan bumps is housekeeping, not evidence of a roadmap, and the release notes' rough edges ("Upgrade PHP Unot") are a small but real signal about release discipline.To executives: We re-evaluated a community GeoIP integration after its 3.0.0 release. Nothing in that release changes the recommendation: it is a maintenance milestone — PHP 8.4/8.5 support, removal of legacy PHP/Symfony and GeoIP v2 support, and tooling upgrades — with no new capabilities. The technical recommendation stands: adopt MaxMind's official PHP library directly and wrap it in ~50 lines of our own code, rather than depend on a single-maintainer Symfony bundle with essentially no adoption and a history of one fork already. Rationale: the bundle is a convenience layer, not a capability layer — the GeoIP database does the work, and the wrapper is trivially replaceable. This keeps us on a well-maintained foundation, avoids lock-in to an unmaintained dependency, and preserves the option to switch to a commercial IP-intelligence API later without touching feature code. Cost impact: near zero in engineering time; the real cost is a MaxMind account and a scheduled database refresh, which we should scope as ongoing operational overhead, not a one-time build. Recommendation: proceed with geo-IP as a supporting capability, built on the official library, delivered behind a feature flag.
To engineering: Treat huluti/geoip2-bundle as prior art rather than a dependency. It confirms the expected shape of the integration — a configured reader service, a database path, a thin domain wrapper returning country/region — and we should replicate that shape in our own service class. The 3.0.0 release is a fork-lineage maintenance bump: it modernizes the supported runtime (PHP 8.4/8.5) and tooling but adds no API surface, and it will force a breaking upgrade on anyone who adopted it — exactly the kind of churn we avoid by owning the wrapper. Pin geoip2/geoip2, define a GeoResolver interface with a MaxMind implementation and a null/cached decorator, keep lookups out of the request hot path where possible, and log misses explicitly so we can measure accuracy before any user-facing feature depends on it. Do not let geo data drive eligibility, pricing, or access decisions in v1.
How can I help you explore Laravel packages today?