Skip to content

v1.23.0

Choose a tag to compare

@yuriizee yuriizee released this 08 Aug 20:16
· 16 commits to main since this release

v1.23.0

Added

  • fromResult() / fromValidatedResult() — a "safe parse" alternative to from()/tryFrom() that never throws. Every parameter is tried, and every failure is collected into a HydrationResult instead of aborting on the first one.
    • HydrationResultok(), value() (throws LogicException if called on a failed result), valueOrNull(), errors().
    • Dot-path errors for nested structure — a nested BaseData or #[DataCollection] field recurses into the target class's own fromResult(), merging errors under field.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