cline / idempotency
Generate reproducible idempotency keys from any data format (JSON, XML, YAML, arrays, objects) regardless of key order
Installs: 0
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
pkg:composer/cline/idempotency
Requires
- php: ^8.4.0
- saloonphp/xml-wrangler: ^1.0
- symfony/yaml: ^7.3
Requires (Dev)
- cline/php-cs-fixer: ^1.0.4
- driftingly/rector-laravel: ^2.0.7
- ergebnis/composer-normalize: ^2.49@dev
- laravel/pint: ^1.25.1
- orchestra/testbench: ^10.6
- pestphp/pest: ^3.8.4
- pestphp/pest-plugin-laravel: ^3.2
- pestphp/pest-plugin-type-coverage: ^3.6.1
- phpstan/phpstan: ^2.1.30
- rector/rector: ^2.2.1
- symfony/var-dumper: ^7.3.4
README
Idempotency
Generate reproducible idempotency keys from any data format (JSON, XML, YAML, arrays, objects) regardless of key order.
Requirements
Requires PHP 8.4+
Installation
composer require cline/idempotency
Quick Start
use Cline\Idempotency\IdempotencyKey; // Generate a key from any data $key = IdempotencyKey::create(['name' => 'John', 'age' => 30]); echo $key->toString(); // "e4a7f8b3c2d1a9f6..." // Key order doesn't matter - same data produces same key $key1 = IdempotencyKey::create(['name' => 'John', 'age' => 30]); $key2 = IdempotencyKey::create(['age' => 30, 'name' => 'John']); $key1->equals($key2); // true
Documentation
- Basic Usage - Getting started with idempotency keys
- Supported Formats - JSON, XML, YAML, arrays, objects, and scalars
- Hash Algorithms - SHA-256, SHA-512, SHA-1, and MD5
- Output Formats - Hex, binary, Base64, Base62, UUID, and versioned strings
- Custom Normalizers - Preprocessing data with custom normalizers
- Advanced Examples - Real-world usage patterns and techniques
Change log
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING and CODE_OF_CONDUCT for details.
Security
If you discover any security related issues, please use the GitHub security reporting form rather than the issue queue.
Credits
License
The MIT License. Please see License File for more information.