github CuyZ/Valinor 1.4.0

latest releases: 1.14.1, 1.14.0, 1.13.0...
20 months ago

Notable changes

Exception thrown when source is invalid

JSON or YAML given to a source may be invalid, in which case an exception can
now be caught and manipulated.

try {
    $source = \CuyZ\Valinor\Mapper\Source\Source::json('invalid JSON');
} catch (\CuyZ\Valinor\Mapper\Source\Exception\InvalidSource $error) {
    // Let the application handle the exception in the desired way.
    // It is possible to get the original source with `$error->source()`
}

Features

  • Introduce InvalidSource thrown when using invalid JSON/YAML (0739d1)

Bug Fixes

  • Allow integer values in float types (c6df24)
  • Make array-key type match mixed (ccebf7)
  • Prevent infinite loop when class has parent class with same name (83eb05)

Other

  • Add previous exception in various custom exceptions (b9e381)

Don't miss a new Valinor release

NewReleases is sending notifications on new releases.