stas-plov/dto-validator-bundle
stas-plov/dto-validator-bundle adds DTO-based validation to PHP applications, letting you define rules for data transfer objects and keep request/input handling clean and reusable. A lightweight bundle for structured validation workflows.
FormRequest rules and ad-hoc array validation with attribute-driven rules declared next to the data they constrain. Evaluate it as a thin buy: it removes boilerplate, not a category of work.>=8.2 to >=8.1. This directly unblocks adoption in services still on PHP 8.1 and removes "upgrade the runtime first" from the critical path. It also means a single dependency can be shared across a mixed-version fleet, which simplifies standardization and reduces the number of version-pinned forks you maintain.Consider it when:
>=8.1, and you want validation rules colocated with DTO properties instead of duplicated in request classes.Look elsewhere when:
FormRequest/Validator gives you (authorization hooks, after hooks, custom message resolution via lang files) and are unwilling to bridge it.For executives (one paragraph): We are evaluating a small, focused validation library for our PHP/Laravel services. The latest patch release (v1.1.4) lowers its minimum PHP version from 8.2 to 8.1, which means we can adopt it across services that have not yet completed their runtime upgrade — removing a sequencing dependency rather than adding one. Cost is near zero (open-source, no infrastructure, no license), risk is low and reversible (patch-level change, no breaking changes, small footprint, rules are plain PHP), and the benefit is less duplicated validation code and more consistent API error behavior. The main caveat is that the project is maintained by a single author and supports an end-of-life PHP version, so we would treat it as a convenience dependency with a documented exit path, not as a platform commitment.
For engineering leads: v1.1.4 is a version-constraint-only release — "php": ">=8.2" → ">=8.1". No API changes, no deprecations, drop-in upgrade. Practical effect: you can install a single version across a mixed 8.1/8.2/8.3 fleet, and DTO validation can land ahead of the runtime migration instead of behind it. Two asks before adoption: (1) confirm the attribute-based rule surface covers ~80% of our actual validation rules — if not, we are buying indirection; (2) confirm our error-response contract is owned by us, not by the package's output format, so swapping the library later is a contained change. Pin the version, keep validation rules expressible in plain PHP, and do not encode business logic that only this package can read.
Trade-off statement: this is a low-cost, low-ceiling improvement. It does not change what we can build; it reduces the cost of building the validation layer we already intend to build, and it slightly widens the window in which we can start.
How can I help you explore Laravel packages today?