Skip to content

Latest commit

 

History

History
21 lines (11 loc) · 1.49 KB

v3.0.0.md

File metadata and controls

21 lines (11 loc) · 1.49 KB

v3.0.0 Migration Guide

Note: this guide assumes you are upgrading from decanter v1 to v3. In order to migrate from v2, please downgrade to v1 first.

This version contains the following breaking changes:

  1. strict true mode will now raise exceptions for unhandled keys.

strict true previously displayed warnings rather than raising exceptions. To adapt to the new behavior, replace all instances of strict true in your app with strict false, and replace all instances of strict :with_exception to strict true.

  1. JoinParser and KeyValueSplitterParser default parsers have been removed.

If you use these parsers in your project, you should include them as custom parsers. Their source code is available on the v1 branch.

  1. All default parsers (except for ArrayParser) now strictly require a single value.

Default parsers will now raise an exception when passed an array of values. For instance, an attribute declared with input <name>, :string will expect to receive a single string rather than an array of strings. Previously, default parsers handled arrays of values in unstable and undocumented ways. In the (unlikely) event that your project was relying on the previous behavior, you can include the legacy version(s) of the parsers as custom parsers in your project.

  1. Decanter exceptions have been renamed from Decanter::Core::<Exception> to Decanter::<Exception>.

If your project relies on specific decanter exception names, make sure to rename those instances accordingly.