Download the PHP package lindelius/php-json-patch without Composer
On this page you can find all versions of the php package lindelius/php-json-patch. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download lindelius/php-json-patch
More information about lindelius/php-json-patch
Files in lindelius/php-json-patch
Package php-json-patch
Short Description A zero-dependency PHP implementation of JSON Patch
License Apache-2.0
Homepage https://github.com/lindelius/php-json-patch
Informations about the package php-json-patch
php-json-patch
A zero-dependency PHP implementation of JSON Patch (RFC 6902).
Table of Contents
- Requirements
- Installation
- Usage
- Protected Paths
Requirements
- PHP 7.4, or higher
Installation
If you are using Composer, you may install the latest version of this library by running the following command from your project's root folder:
You may also manually download the library by navigating to the "Releases" page and then expanding the "Assets" section of the latest release.
Usage
Given a set of JSON Patch operations...
And a document...
You can (atomically) apply the patches through one of the PatcherInterface
methods...
And get a new document back :)
Protected Paths
This library has built-in support for registering "protected paths", which are paths that may not be modified by any patch operation. Protected paths will indirectly also block modifications to their parent path(s) and any child paths.
Please note that "test" operations can still operate on a protected path since they are not actually modifying the document.
All versions of php-json-patch with dependencies
ext-json Version *