Skip to content

1.6.0

Latest

Choose a tag to compare

@apfelbox apfelbox released this 27 Apr 10:06
1.6.0
273a2ce

🎁 New Features

  • Add ContextBag as base helper for using normalizer context.

✨ Improvements

  • Reduce normalization overhead by tracking the debug stack internally across recursion instead of mutating it in context on each nested value.
  • Cache Doctrine-normalized class names in SimpleNormalizer to avoid repeated metadata lookups for the same object type.
  • Add test coverage to ensure class-name normalization is cached across repeated normalization calls.
  • Optimize ValidJsonVerifier by reusing a mutable path stack during traversal instead of allocating a new path array for each nested element.
  • Add dedicated verifier tests for deep-path reporting and first-invalid-element detection.
  • Optimize empty stdClass detection by using an (array) cast check instead of get_object_vars().
  • Add a default max-depth guard (128) for normalization and JSON verification to mitigate deep-nesting DoS risk.
  • Add stack trace to all relevant exceptions as getter.
  • Add stack trace to NormalizationFailedExceptions thrown in custom object normalizers.

What's Changed

  • Add ContextBag + misc Improvements by @apfelbox in #19
  • Add stack traces + tests for a lot of exceptions by @apfelbox in #20

Full Changelog: 1.5.1...1.6.0