cypresslab / patch-manager
A library to manage patch requests
Installs: 69 308
Dependents: 0
Suggesters: 0
Security: 0
Stars: 16
Watchers: 7
Forks: 2
Open Issues: 1
Requires
- php: ^8.0
- ext-json: *
- mattiabasone/phpcollection: ^0.7.0
- symfony/config: ^4.0 || ^5.0 || ^6.0
- symfony/dependency-injection: ^4.0 || ^5.0 || ^6.0
- symfony/event-dispatcher: ^4.0 || ^5.0 || ^6.0
- symfony/http-foundation: ^4.0 || ^5.0 || ^6.0
- symfony/http-kernel: ^4.0 || ^5.0 || ^6.0
- symfony/options-resolver: ^4.0 || ^5.0 || ^6.0
- symfony/property-access: ^4.0 || ^5.0 || ^6.0
Requires (Dev)
- doctrine/orm: ^2.9
- friendsofphp/php-cs-fixer: ^3.1
- mockery/mockery: ^1.4
- phpspec/prophecy-phpunit: ^2.0
- phpstan/phpstan: ^1.0
- phpstan/phpstan-doctrine: ^1.0
- phpstan/phpstan-mockery: ^1.0
- phpunit/phpunit: ^9.5
- yohang/finite: ^1.2
Suggests
- doctrine/orm: PatchManager with op 'data' and doctrine integration
- yohang/finite: PatchManager with op 'state_machine'
This package is auto-updated.
Last update: 2024-12-22 13:40:53 UTC
README
A php library to manage PATCH requests in a standardized (and elegant) way
Be careful!!!
From version 0.3 namespace will change from PatchManager\... to Cypress\PatchManager\...
Install
Install with composer
composer require cypresslab/patch-manager
The idea for this library comes from this blog post: Please. Don't Patch Like An Idiot. by William Durand
It lets you patch resources in an expressive way
PATCH /users/1
{ "op": "data", "property": "username", "value": "new username" }
And let you patch entire collections with multiple operations
PATCH /books
[{ "op": "set_as_read" }, { "op": "return_to_library", "address": "221 B Baker St, London, England"}]
it includes also a Symfony bundle
Still interested? Head over to the wiki... for documentation
Useful commands for development
composer format
: runs php-cs-fixercomposer analyse
: runs phpstan for static analysiscomposer test
: runs phpunit