Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Location Bundle Laravel Package

happyr/location-bundle

A Symfony bundle for adding location support to your application: geocode addresses, store latitude/longitude and address details on entities, and resolve coordinates via pluggable geocoder services. Useful for building location-aware features without wiring geocoding logic yourself.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit — mismatched by framework, not just by version. happyr/location-bundle is a Symfony 2-era bundle: it registers services through the Symfony DI container, hooks Doctrine ORM embeddables and mapping subscribers, and assumes the full-stack kernel boot process. Laravel exposes none of those extension points. Eloquent replaces Doctrine, service providers replace bundles, and Laravel's container — while PSR-11 compatible — is not driven by compiler passes. There is no viable composer require path into a Laravel application; any use requires a fork that rewrites every service definition and every persistence mapping. The bundle's real asset is its shape, not its code.

Integration feasibility — low, and only as a design reference. What is portable is the domain model: a Location value object carrying latitude/longitude plus structured address components, geocoding pushed behind a service interface, and coordinates persisted separately from the display address. In Laravel that translates to roughly 200–300 lines: a value object or cast-backed latitude/longitude columns, an Eloquent cast for validation and clamping, a GeocoderService wrapping a maintained client (geocoder-php/geocoder or a hosted API SDK), a queued job for batch work, and a migration with a spatial index. That is a one-to-two-day build for a mid-level engineer, fully owned and on current dependencies.

Technical risk — high on every axis. Last release 2020-11-11; four stars; zero dependents. Zero dependents is the decisive signal: it means no downstream consumer is filing bugs, so there is no evidence the package works against any current stack and no one to fix it when it does not. The Symfony 2 lineage implies symfony/* 2.x/3.x constraints and PHP 5.5–7.x, which will not resolve on PHP 8.2+, and the code will hit removed functions and stricter type handling if forced. It drags in willdurand/geocoder plus provider adapters whose Guzzle-era HTTP clients conflict with a modern Laravel stack. And an unmaintained package accepting user-supplied addresses and IPs, making outbound HTTP calls, is an unpatched input and egress surface. A 0.02 score is not a small user base — it is a null result.

Key questions for the team.

  1. What is the actual requirement: storing lat/lng on records, forward geocoding, reverse geocoding, IP-to-location, radius/distance search, or map rendering? These have materially different solutions, and only the first is even adjacent to this bundle.
  2. Which database, and does it have spatial support — PostGIS, MySQL spatial types, or plain decimal columns? This decision determines storage design and query performance far more than any PHP package.
  3. Is a commercial geocoding API acceptable — per-request cost, licensing, and contractual limits on storing or displaying results?
  4. What precision does the product promise? IP geolocation is city-level at best and frequently wrong; if the UX implies address precision, IP lookup is disqualifying.
  5. Is there an existing internal geo utility, or a team preference already in the stack (geocoder-php, grimzy/laravel-mysql-spatial)?

Integration Approach

Stack fit — none directly; a rewrite of equal or lesser size. Map the bundle's concepts to Laravel primitives rather than porting its classes: Location value object → a PHP value object plus an Eloquent Cast; Doctrine embeddable → latitude/longitude decimal columns (or a JSON column) with a migration; Symfony DI service → a GeocoderService bound in a service provider and resolved from the container; bundle configuration → config/geocoding.php published via vendor:publish; Geocoder adapters → a maintained client behind your own interface. Keep the interface narrow (one forward, one reverse method) so the provider stays swappable and testable with a fake.

Migration path. There is nothing to migrate from unless a legacy Symfony service still runs this bundle in production. In that case, the correct move is not to port it: keep the Symfony service as the system of record and expose geocoding over an internal HTTP endpoint that Laravel calls. That isolates the EOL framework as a known, bounded liability instead of spreading it. If consolidation is the goal, extract only the domain contract — the value object and the geocoder interface — and reimplement against a maintained client.

Compatibility. Do not attempt installation. If a stakeholder insists on evidence, run composer why-not happyr/location-bundle in a scratch Laravel project on the target PHP version and present the constraint-resolution failure as the finding. If any fragment is genuinely valuable, vendor it under an internal namespace with attribution and rewrite the Doctrine mapping as an Eloquent cast — but budget for rewriting essentially all of it.

Sequencing.

  1. Requirements workshop to pin down geo use cases and precision expectations (half a day, cheap, unblocks everything else).
  2. Storage decision: decimal columns plus a spatial index, or PostGIS if radius and polygon search are core to the product.
  3. Implement the value object and Eloquent cast; unit-test coordinate range clamping, null handling, and serialization.
  4. Integrate a geocoder behind an interface with a caching decorator and a null provider for tests; persist provider responses to avoid repeat spend and to satisfy provider caching terms.
  5. Move all non-interactive geocoding to queued jobs with rate limiting and retry/backoff.
  6. Treat map UI and distance search as separate workstreams with their own estimates — they are not part of "add a location field."

Operational Impact

Maintenance. Adopting the bundle means inheriting an unmaintained Symfony 2 codebase with no upstream fixes and an incompatible dependency graph — the worst maintenance profile available, since you get neither upstream patches nor the freedom to redesign without forking further. Building the equivalent converts an open-ended unknown into a bounded component with current dependencies, tests you own, and a clear upgrade path.

Support. Four stars and zero dependents means effectively no community: no issue-tracker history to mine, no Stack Overflow corpus, no maintainer to escalate to. The only support channel is reading the source. Compare with geocoder-php (active releases, broad adoption) where answers generally exist before you need to ask — and where a security report has somewhere to land.

Scaling. The scaling characteristics that matter live outside the PHP code, in the external geocoding calls. Geocoding is a synchronous, rate-limited, per-request-billed network hop; at volume it is simultaneously the latency bottleneck and the variable line item. Non-negotiable mitigations: cache resolved addresses aggressively, batch through a queue, apply exponential backoff, and put a circuit breaker in front so a provider outage degrades to "location unknown" rather than a stalled request. Spatial search needs a real index — without one, radius queries degrade to full table scans and stop being viable somewhere past a few hundred thousand rows. Neither of these concerns is addressed by a package that only stores coordinates.

Failure modes.

  • Dependency resolution failure at install — the most likely outcome of any adoption attempt, and the cheapest to prove early.
  • Provider quota exhaustion or key revocation silently breaking geocoding; requires explicit alerting and a visible fallback state.
  • Provider terms-of-service violation from caching or displaying geocoded results in ways the licence forbids — a legal failure, not a technical one, and one that surfaces only under audit.
  • SRID and precision mismatch between stored and queried coordinates, producing off-by-hundreds-of-metres errors that are difficult to reproduce and erode trust in search results.
  • IP geolocation inaccuracy in production, surfacing as user-visible wrong-city content and support tickets.
  • Silent abandonment of an internal fork once its original author rotates off — which is precisely the mechanism that produced a package like this one.

Ramp-up. Negligible for the concept, and the concept is essentially all that is on offer — the README is a reasonable sketch and the source is short enough to read in an afternoon. That is the honest argument for spending a day on it: it is a good checklist for what a minimal geo feature needs. Ramp-up on the actual work — provider contracts, caching policy, queue design, spatial indexing, and GDPR obligations around address data (which is personal data) — is unaffected by this package and must be planned on its own terms. Budget the team's learning time there, not here.

Recommendation. Do not adopt. It is framework-mismatched, unmaintained, dependency-hostile, and unsupported, and it saves at most a day or two against a build you would have to own anyway. Read it as documentation, extract the value-object-plus-geocoder-interface pattern, and implement it in Laravel against maintained dependencies.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
coleus/frame
thtg88/journalism
filagora/filagora-ai-forums
rlacerda83/query-parser
socialdept/atp-orm
cboxdk/laravel-assistant-client
socialdept/atp-resolver
socialdept/tenant-domains
tautvydasr/blade-class-names
socialdept/color-scales
maherelgamil/controller
coleus/widgets
coleus/table
coleus/users
coleus/music
coleus/health
coleus/calendar
coleus/notes
coleus/support
coleus/settings