phphd/exceptional-validation
Exceptional Validation brings exception-driven validation to Laravel, letting you express validation failures as exceptions handled by Laravel’s exception pipeline. Keep controllers, form requests, and domain code clean with reusable validation logic.
composer require phphd/exceptional-matcher:2.0.0-rc3 or constrain to ^2.0@rc, and pin the exact RC in applications where exception output is user-facing.src/Integration/. In 2.0.0-rc3, Validator integration and Uid/Validator integrated conditions were moved there, so this is the first place to look when wiring Laravel-specific behavior.ValidationFailedException and ViolationsEmbeddedException are rendered through one consistent formatter instead of duplicating response-shaping logic.renderable hooks, and keep the matcher rules close to your app’s exception policy rather than scattering conditionals across controllers.Integration\ namespace for Validator-related classes and conditions. The RC3 refactor intentionally separates framework integrations from the core matcher, so application code should import from the integration namespace rather than the older core locations.ValidationFailedException and ViolationsEmbeddedException. Configure it once and verify both paths produce the same envelope: message, errors/violations, status code, and any debug metadata.Integration\ when matching depends on request identity, validation state, or similar Laravel context. Keep app-specific conditions in your own namespace and compose them with package conditions.ExceptionMatcher service resolved from the container, injected into the Laravel exception handler. That keeps matching testable in isolation and avoids hard-coding matcher construction in Handler::render.Integration\ imports so the Laravel-specific Validator/Uid pieces remain optional.Integration\. After upgrading from 2.0.0-rc-2, grep for old imports of Validator, Uid, ValidationFailedException, and ViolationsEmbeddedException and update them.ValidationFailedException and ViolationsEmbeddedException may no longer apply. Consolidate to the single formatter and re-check both exception paths.2.0.0 stable.ValidationFailedException and ViolationsEmbeddedException are not both handled by legacy app code. Remove duplicate formatting/response logic or the new single formatter may not be the source of truth.How can I help you explore Laravel packages today?