yucadoo/laravel-geojson-rule
A Laravel validation rule for GeoJSON. Validate geometries, features, and feature collections in form requests or validators, helping ensure map data and spatial payloads are well-formed before storage or processing.
Architecture fit. yucadoo/laravel-geojson-rule is a narrow, single-purpose package: it supplies a Laravel validation rule that asserts a given payload is well-formed GeoJSON. That is a good architectural fit for teams already on Laravel who need to accept geospatial payloads at the boundary of the application — API request validation, form requests, import pipelines. It slots in as a leaf dependency with no expected footprint on domain modelling, persistence, or queue semantics. It is not a geometry engine; if the roadmap includes spatial queries, distance calculations, or SRID-aware storage, this package does not replace PostGIS/geo column work and should not be scoped as if it does.
Integration feasibility. Very high. Adoption is a one-line Composer require plus a rule reference in a FormRequest or inline $request->validate([...]) call. There is no service provider configuration, no migrations, no published assets to reason about. The practical work is not installation but agreeing on what the rule guarantees — schema validity versus semantic validity versus coordinate range — and writing contract tests around the accepted/rejected cases your product actually cares about.
Technical risk. Low, with two caveats. First, this is a patch release (2.0.6 → 2.0.7) whose only change is a Laravel 13.x compatibility PR from Laravel Shift. That is a maintenance signal, not a behaviour change: no API surface moved, no deprecations announced, no migration required. Second, the residual risk is structural rather than release-specific — a small, single-maintainer package in the validation path of a public API is a single point of failure, and validation is exactly the kind of code that fails silently (it accepts something it should have rejected, or vice versa). Pin the version, and treat the rule as one layer in a defence-in-depth strategy rather than the sole guard on geospatial input.
Key questions.
illuminate/* constraints?Stack fit. Native to Laravel; assumes Composer and a conventional validation workflow. It fits cleanly into Laravel's validator extension points and needs no framework-level configuration. Teams on non-Laravel PHP (Symfony, Slim) would be adopting an alien dependency and should look elsewhere.
Migration path. No migration is required for this release. Existing consumers on 2.0.6 can take 2.0.7 as a routine patch bump; there are no breaking changes, no renamed classes, and no config or published-file changes to reconcile. The only reason to move deliberately rather than automatically is if you are mid-flight on a Laravel major upgrade and want the constraint change to land in a controlled window rather than via a lockfile refresh.
Compatibility. The release widens framework compatibility to Laravel 13.x, which is the meaningful takeaway: the package is tracking the current framework line rather than lagging. Verify our pinned PHP version against the package's composer.json before merging, and confirm our CI matrix actually exercises the Laravel version we run in production — the compat claim is only as good as the matrix behind it.
Sequencing.
^2.0.7) rather than a floating range.Feature/FeatureCollection/Geometry, plus known-invalid payloads (malformed ring closure, wrong nesting, non-numeric coordinates).Maintenance. Near-zero steady-state cost. No runtime services, no configuration drift, no scheduled jobs. The ongoing obligation is dependency hygiene: keep the constraint current and re-run the contract tests on each major bump. Budget a small recurring review each Laravel major cycle, since that is precisely the change this package tends to publish.
Support. The maintainer appears responsive enough to accept and merge a framework-compatibility PR — a reasonable signal. But the support model is community, best-effort, single-package. For anything Tier-1, the operational stance should be: we can carry the rule ourselves if upstream goes quiet. Because the package is small, vendoring or reimplementing the rule is a bounded, low-cost contingency worth documenting before, not after, an incident.
Scaling. Irrelevant at the infrastructure layer — validation runs in-process, adds microseconds, and does not touch I/O or shared state. The scaling consideration is cognitive and organisational: if many teams independently adopt the rule with differing assumptions about what it enforces, you get inconsistent API contracts. Centralise usage behind a shared request base class or an internal validation helper so behaviour cannot drift team to team.
Failure modes.
Ramp-up. Trivial for any PHP developer familiar with Laravel validation — under an hour to productive use, most of it spent on the fixture corpus rather than the API. The ramp-up cost that matters is on the consumer side: whoever owns the geospatial contract must be able to say what "valid GeoJSON" means for our product, and that is a domain question the package cannot answer for us.
How can I help you explore Laravel packages today?