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

Phpgmaps Laravel Package

genealabs/phpgmaps

PHPGmaps is a Laravel package that integrates Google Maps into your applications, offering helpers for maps, markers, geocoding, and directions with a simple, fluent API.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit. This package is a thin, object-oriented request builder over Google's Maps web services, ported from BIOSTALL's CodeIgniter library and wrapped for Laravel via a service provider and facade. Architecturally it is a leaf dependency with no transitive weight and no ecosystem footprint: 0 dependents, 27 stars, MIT. It solves exactly one narrow problem — server-side geocoding and directions calls with less boilerplate — and does so by handing back raw decoded Google payloads rather than domain objects. That last detail is the important one for a TPM: the package provides no abstraction boundary, so the shape of Google's response leaks into every call site unless engineering deliberately introduces one. Fit is acceptable only for internal, low-traffic, read-only use; it is a poor fit anywhere the product needs a stable contract, because the product contract and the vendor payload are the same thing.

Integration feasibility. Mechanically easy and strategically unattractive. Installation is a Composer require plus provider/alias registration, config publish, and a single API key. The real work is not installation — it is the surrounding scaffolding that the package does not supply: an internal Geocoder/RouteEstimator contract, a persistent geocode cache table, timeout and retry handling, status normalization, output escaping, and a feature flag to switch drivers. Realistically this is one adapter class, one binding, one migration, and a config change. The library was last released 2017-10-14 and the repository is archived, so the integration cost is low but the total cost of ownership is dominated by the containment work, not the wiring.

Technical risk. Four risks matter at the portfolio level. First, abandonment: archived, single-maintainer lineage, no CVE response path, no compatibility patches. This dependency will break during a Laravel or PHP version bump, and it will break mid-upgrade when the team has the least slack. Second, security: this generation of wrapper interpolates titles, info-window content, and address strings directly into generated JavaScript, so any user-influenced string reaching a marker or label is an XSS injection point; the package also emits inline <script>, which fails under any CSP without 'unsafe-inline' and has no concept of a nonce. Third, silent failure: Google returns HTTP 200 with ZERO_RESULTS, OVER_QUERY_LIMIT, REQUEST_DENIED, or OVER_DAILY_LIMIT in the payload, and a thin wrapper will happily return empty data on a restricted key or blown quota — this looks like "no results" to a user and like nothing at all in logs. Fourth, the key/billing model mismatch: the wrapper predates Google's current restriction types and billing requirements, so server-side and browser-side usage need separate keys and a confirmed billing-enabled Cloud project.

Key questions.

  • Where does this appear — inherited application audit, or a proposed new adoption? If the latter, the answer is no; there is no strategic case at an opportunity score near the floor.
  • Which product surfaces depend on it today: internal back-office lookup, or a customer-facing store locator, delivery coverage check, or property listing?
  • Is there already an internal abstraction boundary, or do controllers and Blade templates call the facade directly?
  • Is the API key restricted and is Cloud billing enabled — and is there one key or two?
  • Does the application ship a Content Security Policy? If yes, the inline-script output is already a live defect.
  • What is the PHP/Laravel target for the next upgrade, and has anyone verified this package on it in a throwaway branch?
  • Is there an owner and a declared end-of-life date for any tool that keeps using it?

Integration Approach

Stack fit. Appropriate for Laravel 5.x-era applications doing server-side, low-volume lookups: geocoding an address in a back-office form, an admin-only distance estimate, a throwaway internal tool. Explicitly out of scope for planning: customer-facing map rendering, Places autocomplete, interactive directions, marker clustering, SPA or mobile surfaces, and anything carrying an uptime, accessibility, or privacy commitment. The stack fit is a scoping decision as much as a technical one — the package can technically emit map markup, but the TPM position should be that it does not, for anything a customer sees.

Migration path. Two paths, chosen by surface. For existing internal call sites, contain: pin the exact version (genealabs/phpgmaps:0.4.3 — earlier releases have a known lookup-URL bug that breaks non-Latin alphabets, so this is a hard floor if international addresses are in scope), introduce the internal interface, move every facade call behind it, land a persistent geocodes table keyed on address hash, and add a driver flag so cutover is an environment change rather than a release. For customer-facing surfaces, replace: implement the same interface against Google's Geocoding/Directions/Distance Matrix web services directly, or — for internal-only tools — drop the dependency entirely in favor of a static map image URL or an outbound Google Maps link, which is often an afternoon of work. Forking is not a migration path; it converts abandonment risk into ownership cost without removing upstream API churn, and is justified only for a single CVE-class fix in a private VCS repo with a recorded owner and exit plan.

Compatibility. Treat compatibility as a research task, not an assumption. Verify PHP and Laravel constraints in a throwaway branch before committing to a date, checking specifically for deprecated dynamic properties under PHP 8+, use of removed framework helpers (array_get(), str_*()), and whether service-provider auto-discovery actually registers on Laravel 5.5+. If it fails, isolate it behind a legacy service boundary — do not widen platform support to accommodate a 2017 dependency. That inversion is the failure mode to name in the ticket, because it is the one that quietly taxes every future upgrade.

Sequencing. Replacement is a prerequisite ticket inside the Laravel/PHP modernization epic, not a parallel workstream. Order: (1) inventory call sites and classify internal vs. customer-facing; (2) pin the version and add the internal interface with a fake binding in tests; (3) land the geocode cache table — this is the asset that survives the package; (4) add the driver flag and the status logging/alerting; (5) replace customer-facing surfaces first, since they carry the CSP, XSS, and SLA exposure; (6) retire internal call sites opportunistically. Have the exit conversation before the next framework upgrade, not during it.

Operational Impact

Maintenance. Effectively zero from upstream and non-trivial internally. There is no maintainer to notify, no patch stream, no CVE response. The source should be treated as frozen vendor code that has been audited once, with a composer.json guard or review-checklist entry that blocks new \Phpgmaps:: calls. Every behavior the product needs — caching, retries, escaping, status normalization, locale defaults like region and language — belongs in the adapter, never in a subclass or a vendor patch. This keeps the frozen code frozen and the replacement surface to a single class.

Support. Support burden shifts to the internal team and is mostly diagnostic. APP_DEBUG tells you nothing here; when a call misbehaves, someone has to log the constructed request URL (minus the key), the HTTP status, and the raw decoded payload, and read status/error_message. Plan for that logging to exist before the first incident, not after. Alerting should fire specifically on OVER_QUERY_LIMIT and REQUEST_DENIED — the latter usually means a key was shipped with the wrong restriction type or the Cloud billing account is disabled, which presents identically to a bad key. Budget an owner: an unowned dependency with no upstream is an audit finding waiting to recur.

Scaling. Quota and cost, not throughput, are the binding constraints. Geocoding is deterministic for a given address string plus locale and region, so cache aggressively — 90-day TTL at minimum, and preferably a persistent geocodes table (address_hash, lat, lng, formatted, provider, fetched_at) that caps quota exposure, survives the package replacement untouched, and gives an audit trail of what address data left the system. Batch work goes to the queue or a console command with delays between chunks, never the request cycle; backfilling 500 addresses in a controller will blow the request timeout and hammer quota. The package has no retry, no backoff, and no timeout handling — the adapter must supply all three, with bounded retries on transport errors only, never on OVER_QUERY_LIMIT (retrying that makes it strictly worse).

Failure modes. Ranked by how they present to a PM: (1) silent empty results — HTTP 200 with an error status in the payload, surfacing as "no results found" to users and as nothing in logs; (2) key and billing misconfiguration — REQUEST_DENIED or the historical OVER_DAILY_LIMIT, often triggered by a Cloud billing lapse rather than a code change, and indistinguishable from a bad key without explicit status logging; (3) CSP breakage — the inline-script map output fails under any policy without 'unsafe-inline', typically discovered at deploy rather than in review; (4) XSS via dynamic marker/label content — any user-influenced string interpolated into a marker title or info-window body; (5) upgrade breakage — the dependency that fails first during a Laravel/PHP bump, at the worst possible moment; (6) unhandled transport failure — no timeout means hung requests under network degradation.

Ramp-up. Low for the package, moderate for the containment pattern. Reading the wrapper is quick because the source is the documentation — it is small, and BIOSTALL's upstream CodeIgniter docs map nearly 1:1 on method names and config keys. The learning cost is in the discipline: engineers must internalize that they call the internal contract, never the facade; that they check status rather than truthiness; that they escape at the boundary with json_encode($v, JSON_HEX_TAG|JSON_HEX_AMP|JSON_HEX_APOS|JSON_HEX_QUOT) or pass data via data-* attributes rather than embedding it in a script body; and that tests bind a stub Geocoder in TestCase::setUp() so the suite never reaches the network. Two keys (IP-restricted for server-side, HTTP-referrer-restricted for browser) wired through separate config values, plus GOOGLE_MAPS_KEY in .env.example and the secret store on day one, should be part of onboarding rather than tribal knowledge.

Portfolio read. With a composite score of 0.6275, an opportunity score near the floor, zero dependents, and a release history that stops in 2017, the honest signal is that there is no strategic upside here and no ecosystem momentum to ride. The decision this evidence supports is contain now, replace on the next upgrade — and a governance precedent worth codifying: no new adoptions of archived packages.

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.
elmogy/larafast
xeviant/laravel-paystack
gorilladash/laravel-website-sdk
martialbe/flysystem-oss
chondal/3312client
jeroen-g/flickr
opscale-co/nova-genbi
itsjustvita/laravel-retention
tequilarapido/trackit
gregsphotography/site-builder-filament
cabaoctavio/laravel-query-log
gregsphotography/site-builder-components
io-digital/clickatell
snowsoft/laravel-admin
oxygen/auth
relicsoftware/barakah-payment-gateway
tobya/work-with-composer
equipc/laravel-email-validator
equipc/laravel-email-database-log
adedsec/nova-translated-labels