diff --git a/docs/pages/project/changelog.md b/docs/pages/project/changelog.md index 9d6c1dda..5f216751 100644 --- a/docs/pages/project/changelog.md +++ b/docs/pages/project/changelog.md @@ -9,6 +9,7 @@ Below are listed the changelogs for all released version of the library. ## Version 1 +- [`1.4.0` — 17th of April 2023](changelog/version-1.4.0.md) - [`1.3.1` — 13th of February 2023](changelog/version-1.3.1.md) - [`1.3.0` — 8th of February 2023](changelog/version-1.3.0.md) - [`1.2.0` — 9th of January 2023](changelog/version-1.2.0.md) diff --git a/docs/pages/project/changelog/version-1.4.0.md b/docs/pages/project/changelog/version-1.4.0.md new file mode 100644 index 00000000..0d6c2726 --- /dev/null +++ b/docs/pages/project/changelog/version-1.4.0.md @@ -0,0 +1,34 @@ +# Changelog 1.4.0 — 17th of April 2023 + +!!! info inline end "[See release on GitHub]" + [See release on GitHub]: https://github.com/CuyZ/Valinor/releases/tag/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. + +```php +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](https://github.com/CuyZ/Valinor/commit/0739d128caa66817ab278bc849ed836fc041b88b)) + +### Bug Fixes + +* Allow integer values in float types ([c6df24](https://github.com/CuyZ/Valinor/commit/c6df24da2bd1bb013ff0aee7c932983646fa4b0e)) +* Make `array-key` type match `mixed` ([ccebf7](https://github.com/CuyZ/Valinor/commit/ccebf78c997eb89caa9bb2b73e82b25d9710e6a3)) +* Prevent infinite loop when class has parent class with same name ([83eb05](https://github.com/CuyZ/Valinor/commit/83eb058478cc7dc162a77bb2800d2fbd1839639d)) + +### Other + +* Add previous exception in various custom exceptions ([b9e381](https://github.com/CuyZ/Valinor/commit/b9e381604c90ac5531e1e7ae6b63b9abda36126e))