mcc-api-tools/request-object-bundle
A Symfony bundle for turning incoming HTTP requests into typed request objects. Centralize validation, mapping, and input handling so controllers stay clean, reusable, and easier to test across API endpoints and request workflows.
Request objects through controllers. It is most useful as an argument, not an artifact: it lets you demo the pattern cheaply and decide whether to standardize on it before investing engineering time in a homegrown abstraction....-request-object-bundle) and repository layout read as a Symfony bundle, not a Laravel package — despite the Laravel/PHP framing. Before any roadmap commitment, confirm it actually targets your framework; a mismatch here is a hard blocker, not a detail.Consider it when:
Look elsewhere when — and note these are the default answers here:
FormRequest + validated() DTOs, or a mature, actively maintained library such as Spatie's Laravel Data. For Symfony, native attribute-based request mapping removes the need for a third-party bundle entirely.To executives: This is a low-cost experiment, not a platform bet. The idea worth testing — typed request objects instead of loose arrays — is a well-established pattern that tends to reduce validation bugs and speed up API changes. The package itself is a tiny, unproven open-source project (1 star, no downstream users, one maintainer), so we should not put it in production. Recommendation: a 1–2 day engineering spike to confirm the pattern's value for us, then adopt the pattern using a maintained library or a small internal implementation. Cost is negligible; the upside is a cleaner API surface and fewer input-validation defects.
To engineering: Borrow the pattern, not the dependency. Use this repo as a worked example of request-object design, verify framework fit (it reads as a Symfony bundle — confirm before we spend time on Laravel integration), and evaluate it against Laravel FormRequest-backed DTOs and Spatie Laravel Data. If we do adopt any of this code, vendor and pin it, keep it behind an internal interface, and review the source for security and error-handling behavior first. Success criteria for the spike: one representative endpoint refactored, with a before/after on validation coverage and test complexity.
How can I help you explore Laravel packages today?