Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Request Validation Bundle Laravel Package

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.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Ecosystem screening (the first decision): Despite being framed as a "Laravel/PHP package," the -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.
  • Build vs. buy for request validation: Validation boilerplate (mapping request payloads into DTOs, running constraints, returning consistent 400 responses) is a recurring cost in every API. This package is a candidate "buy" — but at 0 stars, 0 dependents, and a history of sporadic releases (the latest being a minor patch, 3.0.1, after a long gap since May 2023), the realistic framing is "buy the idea, build the code." Budget a spike to read the source, not a procurement cycle.
  • API contract and error-response standardization: The strategic value is less about validation logic and more about enforcing one shape for validation failures across endpoints. That is a product/UX decision (what does a client see on a 422/400?) that a PM can drive regardless of which library implements it.
  • Roadmap de-risking: This should never appear on a roadmap as a dependency. It is a tactical, replaceable utility — treat it as ~a few hundred lines of glue, not a platform bet. Decide explicitly whether to vendor/fork it or reimplement. The new 3.0.1 release (subscriber now enabled only for /api paths) reinforces that this is a narrow, opinionated utility, not a general-purpose framework component.
  • Feature scoping for a specific service: Reasonable fit for a small internal Symfony service or admin API where speed matters and the blast radius of a bug is low. The 3.0.1 change scopes the subscriber to /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.
  • Reference-implementation use: Even if not adopted, the README and source are a cheap way to align the team on a validation pattern before writing an in-house version.

When to Consider This Package

Consider it when all of the following hold:

  • The codebase is Symfony, not Laravel (confirm by reading the composer.json require block — look for symfony/framework-bundle vs laravel/framework).
  • The service is internal, low-traffic, or pre-revenue, where an unmaintained dependency is an acceptable risk.
  • You need declarative request/DTO validation quickly and are willing to vendor or fork the code under MIT rather than depend on upstream releases.
  • You have someone who can read the entire source in under an hour and own it thereafter.
  • Your Symfony version is old enough that first-party alternatives are absent (see below), and your validation needs are confined to /api-prefixed routes (per the 3.0.1 behavior).

Look elsewhere — or build in-house — when:

  • You are on Laravel. Use FormRequests and Validator; there is no reason to reach across ecosystems.
  • You are on Symfony 6.3+. The framework now ships #[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.
  • You need any maintenance guarantee. Zero stars, zero dependents, and only sporadic patch releases (3.0.1 is a minor behavioral fix, not a signal of active roadmap investment) mean no de facto bug-finding and no bus factor. There is no community to inherit the code.
  • The endpoint is public-facing, regulated, or security-adjacent. Unmaintained validation code on an auth or payments path is not a defensible choice.
  • You require vendor support, SLAs, or a security disclosure process. None exist here.
  • Your validation needs extend beyond /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.

How to Pitch It (Stakeholders)

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.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
jinas/dhivatar
store-doc/laravel-storage-driver
plus-it/laravel-translation-manager
diephp/perhaps
diephp/telegraph
osmaviation/spreadsheet
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console
pnscripts/filament-broadquill-lite
pnscripts/laravel-sentfold-lite
vleap/mx-sdk-laravel-internal
twidpay/utils
htetmyathlaing/scout-elasticsearch-driver
artisan-toolbox/front-awesome
ls/client-assistant
users-au/laravel-client
cgv/localized-resource