json-mapper/laravel-package
Map JSON payloads and arrays into typed PHP objects and DTOs with this Laravel package. A fluent API defines field mappings, nested structures, and collections, with clean integration into Laravel's container, facades, and config.
Scope of this update — 3.0.0 is a breaking major. The release changes the supported-version matrix, which is the single most decision-relevant attribute of a framework integration package. Three findings matter, in order of importance:
composer.json directly — this is now a mandatory step, not a nice-to-have. Note also that 3.0.0 simultaneously raises the floor to Laravel 11 and adds Laravel 13 support; if Laravel 13 is not yet GA, that is forward-looking CI wiring, not a supported configuration you can run today.Architecture fit. Unchanged. json-mapper/laravel-package remains a thin integration shell around the framework-agnostic json-mapper/json-mapper core — service provider registration, JsonMapperInterface container binding, publishable config for the middleware stack, and a facade. That shape is correct for a Laravel integration, and the disposable-framework-glue property is what makes this release survivable: if 3.0.0 does not fit your Laravel version, you can reproduce the wrapper against the core in 20–30 lines. The core library remains the real dependency and is not addressed by this release at all.
Integration feasibility. Still high, but no longer a one-step install. If you are on Laravel 8, 9, or 10, you must either stay on the 2.x line, confirm the "restored" 8/9/10 support actually exists in the 3.0.0 constraint (contradicted by the notes), or write the adapter against the core directly. If you are on Laravel 11 or 12, adoption is straightforward. No queue, asset, route, or migration footprint — that has not changed.
Technical risk. The code risk remains low, but 3.0.0 adds a new category: release hygiene risk.
Key questions for the maintainer / spike (revised):
illuminate/support constraint in 3.0.0, and what does the CI matrix actually test? Resolve the 8/9/10 contradiction before anything else.JsonMapper\Exception\JsonMapperException propagate raw?Stack fit. Narrowed. The package is now appropriate for Laravel 11+ on PHP 8.2+ (subject to the contradiction above), and the previous "Laravel 9+, PHP 8.1+" statement should be retired. If any service in scope runs Laravel 10 or earlier, it is on a different integration path and should be treated as a separate decision, not a version constraint to negotiate around. Use cases are unchanged: integration boundaries where JSON crosses into typed application code. Still a poor fit for Eloquent serialization or public API response layers.
Migration path. Unchanged and still the highest-leverage decision: adopt behind an application-owned port (App\Support\Mapping\JsonHydrator) with a thin adapter delegating to the package. This matters more after 3.0.0 than before it, because it is the mechanism that lets you absorb a package major without touching call sites — and it is now plausible you will need to. If you are on Laravel ≤10, skip the wrapper, write the 20–30 line provider against the core, and take the core dependency decision on its own merits.
Compatibility. Three checks now precede adoption:
composer.json for illuminate/support, php, and psr/container constraints and reconcile against your application and against the release notes. Do not proceed on the prose.JsonMapperInterface binding with existing providers, and no php-di pin conflict.Sequencing (revised):
composer.json and CI config. This gates everything else and is cheap.spatie/laravel-data. The incumbent's ecosystem advantage is unchanged; JsonMapper's differentiators remain the middleware pipeline, no code generation, and lower per-hydration overhead.^3.0) and record the reason in the ADR, so the next upgrade is a deliberate decision rather than a composer update side effect.Maintenance. Low ongoing effort, but the review cadence should tighten from quarterly to on every Laravel major and every package major. 3.0.0 is the concrete case for this: it was a breaking release whose own notes cannot be used to determine compatibility. Assume you may need to vendor or fork the wrapper — still cheap — and that the core remains the expensive thing to fork. The formalised changelog and release automation modestly reduce the chance of silent rot; they do not eliminate it.
Support. Unchanged: GitHub issues only, no commercial backing, no security response process, no CVE history. The addition of release automation and a CI refresh are operational hygiene, not a support commitment. The team still owns resolution. Do not place this where a mapping bug becomes a customer-facing outage with no internal expertise to fix it.
Scaling. Unchanged. Reflection-based hydration is CPU-bound and per-request; cost scales linearly with payload size and nesting depth. Singleton binding limits construction cost, not mapping cost. Benchmark high-volume ingestion endpoints before committing. Memory profile unremarkable.
Failure modes to design against:
composer.json, pin the major, run the spike on the exact target versions."12" becoming 12; null and absent key collapsing to the same result. These masquerade as upstream data bugs for weeks.Each still has a cheap mitigation: strict-mode configuration where available, contract tests over fixtures, explicit exception translation in the app handler, version pinning, and the adapter seam.
Ramp-up. Unchanged for a mid-level Laravel developer — roughly half a day to productivity, concentrated in mapping conventions and in debugging hydration failures where messages are less precise than a hand-written hydrator's. Add a caveat: the package's own release notes are not a reliable source of truth, so the engineer doing the spike must be comfortable reading composer.json, CI config, and provider source. Documentation quality remains unverified and should be assessed during the spike; budget for one engineer to become the internal reference.
Overall. Recommendation narrows to: proceed with the bounded pilot only if you are on Laravel 11+ and the composer.json constraints match the release notes. For teams on Laravel ≤10, the wrapper is no longer the right entry point — either stay on 2.x deliberately or integrate the core directly behind the adapter. The 3.0.0 release is net-positive on forward compatibility (Laravel 13, formalised release process) and net-negative on trust (contradictory breaking-change notes on a major). The underlying calculus is unchanged: small, technically sound, appropriately scoped, and unvalidated by anyone you can point to. The adapter seam remains the condition of adoption, and the core library — untouched by this release — remains the dependency actually being evaluated.
How can I help you explore Laravel packages today?