PHPackages                             cline/idempotency - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. cline/idempotency

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

cline/idempotency
=================

Generate reproducible idempotency keys from any data format (JSON, XML, YAML, arrays, objects) regardless of key order

2.0.2(2mo ago)02.7k↓26.4%2MITPHPPHP ^8.5.0CI passing

Since Mar 4Pushed 2mo agoCompare

[ Source](https://github.com/faustbrian/idempotency)[ Packagist](https://packagist.org/packages/cline/idempotency)[ RSS](/packages/cline-idempotency/feed)WikiDiscussions 2.x Synced 1mo ago

READMEChangelog (1)Dependencies (18)Versions (7)Used By (2)

[![GitHub Workflow Status](https://github.com/faustbrian/idempotency/actions/workflows/quality-assurance.yaml/badge.svg)](https://github.com/faustbrian/idempotency/actions)[![Latest Version on Packagist](https://camo.githubusercontent.com/675786f8d58890ca3ac4ebce52592287945fb755e66c43bd36bad9569af2da2b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f636c696e652f6964656d706f74656e63792e737667)](https://packagist.org/packages/cline/idempotency)[![Software License](https://camo.githubusercontent.com/784362b26e4b3546254f1893e778ba64616e362bd6ac791991d2c9e880a3a64e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d677265656e2e737667)](LICENSE.md)[![Total Downloads](https://camo.githubusercontent.com/2e78095077c6b1f3f6758b266415e986239642d027ceb399c2678bed01c8e6ee/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f636c696e652f6964656d706f74656e63792e737667)](https://packagist.org/packages/cline/idempotency)

---

Idempotency
===========

[](#idempotency)

Generate reproducible idempotency keys from any data format (JSON, XML, YAML, arrays, objects) regardless of key order.

Requirements
------------

[](#requirements)

> **Requires [PHP 8.4+](https://php.net/releases/)**

Installation
------------

[](#installation)

```
composer require cline/idempotency
```

Quick Start
-----------

[](#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
-------------

[](#documentation)

- **[Basic Usage](DOCS.md#doc-docs-basic-usage)** - Getting started with idempotency keys
- **[Supported Formats](DOCS.md#doc-docs-supported-formats)** - JSON, XML, YAML, arrays, objects, and scalars
- **[Hash Algorithms](DOCS.md#doc-docs-hash-algorithms)** - SHA-256, SHA-512, SHA-1, and MD5
- **[Output Formats](DOCS.md#doc-docs-output-formats)** - Hex, binary, Base64, Base62, UUID, and versioned strings
- **[Custom Normalizers](DOCS.md#doc-docs-custom-normalizers)** - Preprocessing data with custom normalizers
- **[Advanced Examples](DOCS.md#doc-docs-advanced-examples)** - Real-world usage patterns and techniques

Change log
----------

[](#change-log)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) and [CODE\_OF\_CONDUCT](CODE_OF_CONDUCT.md) for details.

Security
--------

[](#security)

If you discover any security related issues, please use the [GitHub security reporting form](https://github.com/faustbrian/idempotency/security) rather than the issue queue.

Credits
-------

[](#credits)

- [Brian Faust](https://github.com/faustbrian)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License. Please see [License File](LICENSE.md) for more information.

###  Health Score

47

—

FairBetter than 94% of packages

Maintenance88

Actively maintained with recent releases

Popularity22

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~26 days

Total

6

Last Release

61d ago

Major Versions

1.0.1 → 2.0.02026-03-04

PHP version history (2 changes)1.0.0PHP ^8.4.0

1.0.1PHP ^8.5.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/22145591?v=4)[Brian Faust](/maintainers/faustbrian)[@faustbrian](https://github.com/faustbrian)

---

Top Contributors

[![faustbrian](https://avatars.githubusercontent.com/u/22145591?v=4)](https://github.com/faustbrian "faustbrian (9 commits)")

---

Tags

phphashidempotencykey-generationdata-normalization

###  Code Quality

TestsPest

Static AnalysisPHPStan, Rector

Code StyleLaravel Pint

Type Coverage Yes

### Embed Badge

![Health badge](/badges/cline-idempotency/health.svg)

```
[![Health](https://phpackages.com/badges/cline-idempotency/health.svg)](https://phpackages.com/packages/cline-idempotency)
```

###  Alternatives

[hi-folks/data-block

Data class for managing nested arrays and JSON data.

1472.2k](/packages/hi-folks-data-block)[nilportugues/php_todo

Looks into the code using a user-defined list of to-do phrases and stops commit if the total amount increased or is above a threshold.

1210.0k](/packages/nilportugues-php-todo)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
