更新日志 1.4.0 — 2023 年 4 月 17 日¶
重要变更¶
源无效时抛出异常
提供给源的 JSON 或 YAML 可能无效,在这种情况下,现在可以捕获和操作异常。
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()`
}
新功能¶
- 引入使用无效 JSON/YAML 时抛出的
InvalidSource( 0739d1 )
错误修复¶
其他¶
- 在各种自定义异常中添加先前的异常( b9e381 )