Skip to content

Releases: carsdotcom/laravel-json-model

v1.2.2

04 Dec 16:18
8a7dac4
Compare
Choose a tag to compare

If an attribute mutator on a JsonModel throws an exception, that exception will also be caught and the change reverted during safeUpdateRecursive. This lets us support attribute mutators that try to clean up values but will ultimately throw an exception if the data can't possibly be massaged.

v1.2.1

21 Nov 19:48
78d9eb6
Compare
Choose a tag to compare

When HasJsonModelAttributes hydrates a JsonModel, the model is already isDirty() === false which is correct. Fixes a bug when HasJsonModelAttributes hydrates a CollectionOfJsonModels all the models should also be isDirty() === false and improves test coverage.

v1.2.0

13 Nov 15:28
9f4bbc7
Compare
Choose a tag to compare

Updates safeUpdateRecursive to catch any exception and anything that causes saving handler to return false. The method now returns an array of all the exceptions it caught.

Deprecates safeUpdate -- given that it's designed to work with semi-trusted inputs, it's always safer to recurse into child objects rather than risk overwriting them.

v1.1.0

12 Jul 17:28
3d75b3e
Compare
Choose a tag to compare

Formal support for Laravel 10 and 11, and a matrixed test runner for PRs.

v1.0.1

01 Aug 16:38
b2d4df6
Compare
Choose a tag to compare

What's Changed

Full Changelog: v1.0.0...v1.0.1

v1.0.0

12 Jul 20:18
8d37fc5
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: https://github.com/carsdotcom/laravel-json-model/commits/v1.0.0