• v1.0.0-beta4 5201e564ca

    v1, Beta 4 Pre-Release

    danieljsummers released this 2024-07-04 16:12:17 +00:00 | 16 commits to main since this release

    Parameters::json accepts either an object or an array for its value. In beta 3, an array was unaware of pjson annotations, so custom serialization functions were not called. In this release, if the document array has one entry, and that entry is an array of objects that support toJson() (pjson's serialization function), these will now use the pjson-aware serialization.

    This change allows an array of custom items to be replaced using Patch and passing a single key array with these items. Example:

    Patch::byId('doc_table', 'abc123', ['items' => [$item1, $item2, $item3]]);
    

    This also adds the flags passed to the non-pjson json_encode options to it as well (unescaped slashes and unicode).

    Downloads