siriusphp/validation
SiriusPHP Validation is a standalone PHP validation library with a rich set of built-in rules, nested array support, custom rules and error messages, and a simple API for validating forms and structured input.
Architecture fit
siriusphp/validation is a deliberately framework-agnostic validator: standalone rule objects, a Validator entry point, and no coupling to HTTP, containers, or templating. That is a strength in a hexagonal/DDD codebase and a liability in an opinionated framework like Laravel.$request->validate(), the ValidationException → 422/redirect handling, the $errors bag, Blade directives, localization via lang/*/validation.php, and php artisan make:request. Adopting siriusphp means either bypassing that pipeline or writing an adapter that re-implements it.illuminate/*. As an HTTP-boundary replacement for Laravel validation, it is a poor fit.Integration feasibility
ValidatorInterface port and inject it into domain services. The friction is not installation; it is the seam between siriusphp's error model (rule-keyed message arrays) and Laravel's MessageBag/ValidationException contract.bail, sometimes, Rule::when, nested array wildcards, DB-backed rules (unique, exists), custom rule objects, after-hooks — must be re-created or abandoned.Technical risk
composer.json PHP constraint against your target (Laravel 11/12 require PHP 8.2+); PHP 8.3/8.4 deprecations are unaddressed upstream.Key questions
illuminate/validation does this close? If the answer is "none, we want framework independence," is the isolation worth a self-maintained dependency?respect/validation, symfony/validator, or a thin in-house domain validator be a better-maintained fit for the same isolation goal?Stack fit
DomainValidator port in your application layer, implement it with siriusphp, and keep Laravel's validator at the HTTP boundary for transport-level concerns (types, presence, auth-scoped uniqueness).Migration path
symfony/validator and respect/validation in the same spike — the decision should be comparative, not default.Compatibility
illuminate/validation; no autoload conflict expected. Composer resolution is the main risk vector (PHP constraint and any transitive pinned dependencies).lang/ tree — plan for two translation pipelines or a shared abstraction.Sequencing
symfony/validator and respect/validation on maintenance, rule coverage, and message i18n. Default to Laravel's validator if the isolation requirement is not concrete.MessageBag bridge so the choice remains reversible.Maintenance
Support
Scaling
illuminate/validation — not a decision-relevant factor.Failure modes
null, nested keys, numeric strings) — produces bad data or spurious 422s.Ramp-up
symfony/validator and respect/validation first — the 1.83 score and 2022 release cadence make this a difficult default to justify.How can I help you explore Laravel packages today?