v1.23.0
v1.23.0
Added
fromResult()/fromValidatedResult()— a "safe parse" alternative tofrom()/tryFrom()that never throws. Every parameter is tried, and every failure is collected into aHydrationResultinstead of aborting on the first one.HydrationResult—ok(),value()(throwsLogicExceptionif called on a failed result),valueOrNull(),errors().- Dot-path errors for nested structure — a nested
BaseDataor#[DataCollection]field recurses into the target class's ownfromResult(), merging errors underfield.name/field.index.name.#[Flatten]merges flat, with no prefix. #[RejectUnknownKeys]reports a'$unknown'entry instead of aborting; a failing class-level#[Pipe]reports'$pipeline'; a throwing constructor reports'$construct'; invalid non-array input reports'$input'.fromValidatedResult()merges#[Rules]/#[InferRules]failures into the same error map.- No hot-path cost:
from()/tryFrom()are unaffected — confirmed via benchmark comparison (see above).
- Docs: fromResult() — Error Accumulation.
Full Changelog: v1.22.0...v1.23.0