- Does petrepatrasc/google-map-bundle work with Laravel?
- No. It is a Symfony2 bundle built around AppKernel registration, a DependencyInjection extension, XML/YAML service definitions, and Twig helpers, none of which exist in Laravel. Laravel has no bundle concept, and the package ships no service provider, config file, or Blade directives. Treat any Laravel compatibility claim as inaccurate.
- Is this package still maintained?
- No. It has zero stars, zero dependents, and no releases or security advisory channel. The Symfony 2.8 line it targets reached end of life in November 2019. There is no external regression signal, so assume bugs will not be fixed upstream.
- Which PHP and Symfony versions does it support?
- It was written for the Symfony 2 and PHP 5.x era, and its composer.json is expected to carry PHP 5 constraints plus code patterns removed in PHP 8, such as curly-brace string offsets, each(), and dynamic properties. Current Laravel requires PHP 8.1 or newer, so a hard modernization pass would be mandatory rather than optional. Expect fatal errors before you reach any map logic.
- How do I install and configure the bundle?
- In a Symfony2 application you would add it via Composer, register the bundle in AppKernel, and import its service configuration. Map instances are then defined through the bundle's configuration tree and rendered from Twig templates. There is no equivalent installation path for Laravel.
- What features does the bundle provide?
- It wraps Google Maps JavaScript API embedding so you can define map instances with options such as center and zoom, attach markers, and render them from Twig templates. The stated goal is avoiding repeated JavaScript boilerplate in every template. It does not add capability beyond what the underlying map library and Google's JS API already offer.
- Can I use it for static maps, geocoding, or directions?
- The bundle is primarily an interactive JS map embed helper, and a wrapper of this age very likely emits keyless or unsigned map URLs and references to parameters that have since been renamed. Only geocoding and polyline or overlay encoding have genuine server-side justification. Because Google Maps Platform now requires an API key tied to a billing account, and URL signing for some endpoints, verify every generated request against current documentation before relying on it.
- Is it safe to use in production?
- Risks are high and concentrated in abandonment and API drift. There is no security advisory channel, no dependents surfacing field-tested fixes, and the Symfony contract it targets is long unsupported. Once you own a fork, Google Maps Platform terms of service, including attribution, geocode caching limits, and the 30-day retention ceiling, become your compliance obligation. A stale wrapper will not enforce those constraints for you.
- How much work is it to port this bundle to Laravel?
- A realistic path is to locate and vendor the framework-agnostic builder and encoder classes, strip the Symfony DI and Twig coupling, rewrap them in a Laravel service provider, modernize to PHP 8.1 or newer, then add characterization tests. That is roughly two to four engineer-weeks before any product feature work. Reimplementing the same surface from scratch is closer to two to four engineer-days and produces code you designed and can test.
- What are the alternatives for Google Maps in Laravel?
- For interactive maps, the Google Maps JavaScript API plus a Blade partial replaces most of this bundle. For server-side needs, use official Google Maps services or a maintained HTTP client for geocoding and directions, and implement polyline encoding yourself if required. If you want a PHP library layer, look at the maintained framework-agnostic library this bundle wraps rather than the bundle itself.
- Can I fork it because it is MIT licensed?
- Yes, MIT permits forking, modification, and redistribution provided the license notice is preserved. Forking is technically straightforward but strategically poor here because the Symfony wiring and Twig helpers are exactly the parts you would discard. Once you fork, you also inherit maintenance and Google Maps Platform compliance responsibilities with no upstream to lean on.