macpaw/request-dto-resolver
macpaw/request-dto-resolver automatically maps incoming Laravel request data into typed DTOs, cutting boilerplate and keeping controllers clean. It resolves DTO constructor parameters, supports nested objects, and makes request handling more explicit, predictable, and easy to test.
$request->all()). That is an architecture standard, not a feature, and it is cheap to adopt and expensive to retrofit later. Treat this repo as a reference implementation for that standard, not as a dependency to install.Validator::make() calls.Consider it (or its pattern) when:
Look elsewhere when:
FormRequest (validation + authorization in one object), spatie/laravel-data (DTOs with casting, validation, and OpenAPI generation), or a small custom resolver bound in a service provider.composer.lock is correct for a library, but combined with the above it reinforces "read-only reference."Recommended posture: run a one-week timeboxed spike, copy the pattern into Laravel conventions, and measure controller LOC and validation-defect count on two endpoints. Decide build-vs-fork on that data, not on the package's merits.
For executives (one paragraph): We evaluated a small open-source Symplony-library that turns incoming HTTP request data into typed, validated objects before it reaches business logic. It is a 1-star, zero-dependent, single-maintainer project on a different framework than ours, so we are not recommending it as a dependency. We are recommending we adopt the pattern in-house — a contained, low-cost engineering standard that reduces boilerplate and malformed-input bugs on new API endpoints. Cost is one engineer-week; the risk is essentially zero because nothing third-party ships to production. This is a code-quality decision, not a platform bet.
For engineering: The pattern is worth standardizing on; this package is worth reading, not installing. On Laravel, we already have FormRequest and spatie/laravel-data covering 80% of it — the gap is controller-argument hydration for non-validated DTOs, which is a small resolver bound in a service provider. Spike it, benchmark LOC and defect rates on two endpoints, then write an ADR. If we ever move to Symfony, this repo is a useful prior-art reference and nothing more.
Risks to state plainly: single maintainer, no dependents (no one has validated it in production), framework mismatch for our stack, and release metadata that needs verification. Mitigation: fork or reimplement, keep it under our tests, and avoid any upstream merge path.
How can I help you explore Laravel packages today?