creof/doctrine2-spatial
Doctrine2 spatial extension that adds geometry and geography data types and DQL spatial functions to Doctrine ORM, making it easy to store and query points, lines, and polygons with MySQL or PostgreSQL/PostGIS. Supports distance, bounding-box, and other spatial operations in Laravel and plain PHP pr...
Consider it when:
Look elsewhere when:
Executive summary: creof/doctrine2-spatial is a low-cost, MIT-licensed accelerator for adding basic location-aware features to a legacy Doctrine 2 PHP application. It can help ship proximity search, store locators, and spatial data storage faster by reducing custom database work. The trade-off is age: the last release was in 2017, so it should be treated as a tactical dependency, not a strategic platform. Recommendation: run a short compatibility spike against our exact stack; if it passes, use it behind an internal abstraction for a scoped geo MVP, and budget a migration path for when we modernize Doctrine/PHP or outgrow basic spatial queries.
For engineering: The package provides Doctrine spatial types and DQL functions across supported platforms, reducing bespoke DBAL mappings and database-specific SQL. It is not a GIS system and does not replace geocoding, routing, or advanced spatial analytics. Main risks are maintenance status, PHP/DBAL compatibility, and limited community support. Mitigate by pinning versions, adding integration tests against our database engines, isolating usage, and evaluating maintained alternatives or a fork if adoption becomes long-term.
How can I help you explore Laravel packages today?