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

Exceptional Validation Laravel Package

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.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit. phphd/exceptional-matcher is a small, single-purpose library for matching/asserting exceptions, with optional integrations for Laravel's Validator (surfacing ValidationFailedException and ViolationsEmbeddedException) and for UID-typed models. It belongs in the test-support layer, not the application runtime, so its architectural footprint is minimal: one dev dependency, no service boundaries, no data ownership, no deployment surface.

Integration feasibility. Adoption is a Composer install plus wiring into the test suite. The 2.0.0-rc3 changes are refactors rather than features: a single shared formatter for ValidationFailedException and ViolationsEmbeddedException, and relocation of the Validator and Uid integration classes into an Integration\ namespace. Consumers who only use the matcher API are largely insulated; consumers who imported the integration classes directly face a namespace migration.

Technical risk. Moderate, concentrated in three areas:

  • Pre-release status. This is the third release candidate for 2.0.0. Two consecutive RCs landing namespace reorganizations signals the public surface is still settling; further moves before GA are plausible.
  • Namespace churn. Moving Validator/Uid classes into Integration\ is a breaking change for direct importers. Without class aliases or a documented upgrade path, upgrades fail at autoload time rather than at compile time, which is harder to catch.
  • Observable formatting change. Consolidating to a single formatter changes the rendered exception/violation output for at least one of the two exception types. Any test asserting on message strings or snapshots may break even though behavior is "unchanged."

Key questions.

  • What is the supported PHP/Laravel version matrix, and does rc3 narrow it?
  • Is there a published 2.0.0 GA date, and will RC-to-GA preserve the Integration\ namespace?
  • Are backward-compatibility aliases provided for the pre-refactor class locations?
  • Is the formatter output considered part of the public contract, and is the diff documented?
  • Does the package support PHPUnit and Pest equally, and is CI green across the declared matrix?
  • Is there a formal upgrade guide for 1.x → 2.0 and rc2 → rc3?

Integration Approach

Stack fit. Fits any Laravel or standalone PHP codebase using PHPUnit or Pest that needs expressive exception assertions. The Validator integration assumes Laravel's validation layer; the Uid integration assumes UID-keyed models. Teams not using those features can consume the core matcher and ignore the refactored namespaces entirely.

Migration path. Pin exactly (2.0.0-rc3) rather than floating on a range, and require minimum-stability: RC scoped to this package only. From 1.x, treat as a major upgrade: inventory every import of the old Validator/Uid classes, rewrite to Integration\, then re-run the full suite. From rc2, the diff is effectively import paths plus formatter output — a targeted find-and-replace plus an assertion audit.

Compatibility. No backward-compatibility guarantee should be assumed for an RC. Keep the dependency in require-dev; never let it reach production autoload paths. Confirm composer.json constraints against the application's PHP and Laravel versions before committing.

Sequencing.

  1. Pilot in one non-critical service or a single test suite; pin rc3.
  2. Grep for integration-class imports and refactor to Integration\.
  3. Re-run snapshot/message assertions to surface formatter output changes; update expectations deliberately, not mechanically.
  4. Hold broader rollout until 2.0.0 GA ships with a stable namespace and an upgrade note; re-validate at GA rather than assuming rc3 is final.

Operational Impact

Maintenance. Low code footprint, but non-trivial dependency churn while in RC. Assign explicit ownership of Composer updates and track the GA milestone; each RC should be a scheduled, reviewed change rather than an automatic bump.

Support. Small open-source project with a single dominant maintainer visible in the release notes — community support only, no SLA, no vendor escalation path. Acceptable here because the blast radius is test tooling only.

Scaling. No runtime scaling considerations. At scale the cost is breadth of change: a formatter adjustment or namespace move touches every test file that asserts on exception text, so the effective change surface grows with suite size even though the package is tiny.

Failure modes.

  • Class-not-found at test bootstrap after the namespace move, failing the whole suite rather than individual tests.
  • Formatter unification silently altering expected messages, producing false failures that get "fixed" by weakening assertions.
  • Further namespace churn between rc3 and GA, repeating the migration.
  • Transitive constraint conflicts with the application's Laravel version during a future upgrade.
  • RC abandoned or renamed before GA, forcing a fallback to 1.x.

Ramp-up. Low for engineers already fluent in PHPUnit/Pest — roughly half a day to pilot and validate. Budget one to two days for the full import refactor and assertion audit across an established suite, plus a short review cycle for each subsequent RC until GA.

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.
coleus/frame
thtg88/journalism
filagora/filagora-ai-forums
rlacerda83/query-parser
socialdept/atp-orm
cboxdk/laravel-assistant-client
socialdept/atp-resolver
socialdept/tenant-domains
tautvydasr/blade-class-names
socialdept/color-scales
maherelgamil/controller
coleus/widgets
coleus/table
coleus/users
coleus/music
coleus/health
coleus/calendar
coleus/notes
coleus/support
coleus/settings