yoanm/jsonrpc-params-symfony-validator-sdk
Symfony Validator integration for JSON-RPC params: validate incoming request parameters against Symfony validation constraints and mapping rules, with clean violation handling for yoanm/jsonrpc-server-sdk.
Architecture fit
yoanm/jsonrpc-* family by delegating to symfony/validator. Its only job is: accept JSON-RPC params plus a validation rule/constraint set, run Symfony Validator, and surface violations back to the JSON-RPC server layer (ideally as -32602 Invalid params).yoanm/jsonrpc-server-sdk (or the params-validator interface package) to expose an actual JSON-RPC endpoint. For a conventional Laravel REST/Inertia application it introduces a second, parallel validation stack alongside Illuminate\Validation, with no shared error format, no FormRequest integration, and no Blade/Inertia error-bag benefits.Integration feasibility
ValidatorBuilder with metadata loaders (attributes/YAML/XML), a cache pool for metadata, and a binding for Symfony\Component\Validator\Validator\ValidatorInterface. That is a ~50-line service provider plus a config file.illuminate/*.Technical risk
Valid cascade, group sequencing, message formatting). Engineers will need discipline to avoid mixing the two idioms.Key questions
yoanm/jsonrpc-params-validator-sdk interfaces and a specific server SDK major version?-32602 with data?Stack fit
Illuminate\Validation and note this package as evaluated-and-rejected.Migration path
/rpc route group and a single controller that hands off to yoanm/jsonrpc-server-sdk.JsonRpcServiceProvider with an explicit metadata cache pool.ConstraintViolationListInterface to the JSON-RPC error payload (code -32602, data.violations[]).RpcParamsValidator interface; the vendor class is an implementation detail.Compatibility
symfony/validator requirement of ^6.4 || ^7.0 is the expected happy path; anything narrower should be flagged.Sequencing
-32602. Decision gate: does the vendor interface model match our DTO style?Maintenance
Support
Scaling
Failure modes
ValidationFailedException bubbling to the framework → HTTP 500 instead of a JSON-RPC error. Mitigate with a global exception renderer scoped to the RPC route group.Ramp-up
Illuminate\Validation needs 1–2 days plus a written conventions note.How can I help you explore Laravel packages today?