michaelcozzolino/symfony-validation-enhancements-bundle
A Symfony bundle that enhances the Validator component with additional validation features and constraints. Integrates quickly into existing Symfony applications to simplify common validation scenarios and keep validation logic reusable and configuration-driven.
EntityExists-style constraints or duplicating error-listener wiring across services.EntityExistsValidator (now with a non-existence mode) supports decisions around referential integrity validation in forms and API payloads — e.g. verifying a referenced record exists before persisting, or asserting uniqueness/absence for registration and invite flows. This is roadmap-relevant for any feature that accepts foreign identifiers from untrusted input.Consider it when:
Rule::exists(), Rule::unique(), form requests, and ValidationException handling already cover most of this surface with zero added dependency.michaelcozzolino/php-redefinitions) is acceptable in your supply-chain review.Look elsewhere when:
For executives (one paragraph): A small open-source PHP validation library just reached its first stable release. It replaces hand-written "does this record exist?" checks and ad-hoc error formatting with a maintained, documented, statically analyzed component, and adds the ability to assert that a record does not exist — useful for signup and invite flows. The strategic value is modest and defensive: slightly less custom code to own, a more consistent API error contract, and a lower chance of validation bugs reaching customers. Cost is near zero in license terms; the real considerations are that it is a Symfony component (so it does not apply to our Laravel services) and that it is maintained by a single author, which is a supply-chain and continuity risk worth a one-line acknowledgment rather than a blocker.
For engineering leads: The 1.0.0 milestone brings documentation, PHPStan static analysis, a Pest-based test suite, and a structured validation-error listener. The EntityExistsValidator now supports both existence and non-existence assertions. Two caveats to flag in review: (1) rule names changed in this release — any 0.2.0 consumers need a rename pass, ideally covered by tests; (2) framework fit is Symfony only, so scope adoption to Symfony services and leave Laravel services on native rules. Recommend a time-boxed spike in one service, measured against the lines of validation code it removes, before any broader standard.
Recommendation: Adopt opportunistically in Symfony services that already hand-roll entity-existence constraints or duplicate error-response shaping. Do not standardize org-wide; do not adopt in Laravel services; pin the version and re-review at the next major.
How can I help you explore Laravel packages today?