mkoprek/request-validation-bundle
A validation bundle for PHP applications that applies rules to incoming HTTP request data, helping you reject malformed or missing input before it reaches your controllers. Define rules once and get consistent validation behavior and error responses across your request handling.
-bundle suffix and the author's other work point to a Symfony bundle, not a Laravel package. The first product decision is simply whether the team owns any Symfony services at all. If the answer is "Laravel only," this package is out of scope and the evaluation ends here./api paths) reinforces that this is a narrow, opinionated utility, not a general-purpose framework component./api routes, which aligns with typical API validation but means non-API routes are now excluded — verify that matches your routing. Not a fit for public, high-traffic, or security-sensitive endpoints.Consider it when all of the following hold:
composer.json require block — look for symfony/framework-bundle vs laravel/framework)./api-prefixed routes (per the 3.0.1 behavior).Look elsewhere — or build in-house — when:
Validator; there is no reason to reach across ecosystems.#[MapRequestPayload] and #[MapQueryString] attributes plus symfony/validator, which cover most of this bundle's surface area with first-party support. This is the single strongest argument against adoption./api-prefixed routes. The 3.0.1 change restricts the subscriber to /api paths; if you need validation on other route prefixes, this package now requires modification or falls short.To executives: This is a small, MIT-licensed utility that could shave a sprint off request-validation work in one of our Symfony services. It costs nothing to evaluate and nothing to abandon. The catch is maturity: no community, no recent feature work, one author — the latest 3.0.1 patch only narrows the subscriber to /api paths, which is a sensible but minor scoping fix, not a sign of active product investment. Recommendation is a time-boxed spike (1–2 days), not adoption — we read the code, decide if it saves us real time, and if so we copy it into our repo under MIT so we control it. We are not adding a vendor or a long-term dependency.
To engineering: The problem it addresses is real — controller-level payload validation and consistent error responses are repetitive. But check the ecosystem first: if we're on Symfony 6.3+, #[MapRequestPayload] and symfony/validator already do this with first-party support, and the package is redundant. If we're on an older Symfony, or we simply like the ergonomics, treat this as reference code to vendor, not a Composer dependency. Read the full source before committing — at this size it should be an afternoon. Note the 3.0.1 change: the subscriber now only activates on /api paths, so confirm that matches our route structure before proceeding. Confirm the Symfony-vs-Laravel question in composer.json before anyone spends time on it.
How can I help you explore Laravel packages today?