[13.x] Throw on unencodable JSON in object casts
Merged
XU
9d ago+47+47+01234567890123456789-5-5-0123456789
Follow-up to #62175.
AsArrayObject, AsCollection, AsFluent and their encrypted versions silently wipe the column when the value can't be encoded:
// settings: {"theme":"dark","name":"Muller"}
$user->update(['settings' => ['theme' => 'dark', 'name' => "M\xFCller"]]);
// settings: 0