1.4.0
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 matchmixed
(ccebf7) - Prevent infinite loop when class has parent class with same name (83eb05)
Other
- Add previous exception in various custom exceptions (b9e381)