kumwe / idempotency
Portable idempotency keys, immutable replay state and ledger ports.
Requires
- php: ^8.5
- ext-json: *
- kumwe/canonical-json: 0.1.1
Requires (Dev)
- phpstan/phpstan: ^2.1
- phpunit/phpunit: ^12.5
- squizlabs/php_codesniffer: ^4.0
Suggests
None
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-09-12 15:15:52 UTC
README
Immutable replay identities, request fingerprints, captured results, state transitions and durable ledger ports
under Kumwe\Idempotency. Requires PHP 8.5, JSON and exact Canonical JSON 0.1.1.
Installation and use
Install the published package with an exact pre-1.0 pin:
composer require kumwe/idempotency:0.1.2
<?php require 'vendor/autoload.php'; use Kumwe\Idempotency\IdempotencyKey; $key = IdempotencyKey::fromString('request-001'); assert($key->value() === 'request-001'); assert($key->equals(IdempotencyKey::fromHeader(' request-001 ')));
Record and result operations require an explicitly supplied Kumwe\CanonicalJson\CanonicalEncoder conforming to
kumwe-canonical-json/generic-v1. There is no encoder fallback. The
typed consumer example demonstrates claim collision and stable replay with test adapters.
Core integration
Core binds IdempotencyLedger, SecretOnceIdempotencyLedger and IdempotencyPurger to durable adapters. Values are constructed directly; no ConfigProvider is needed. Core supplies authenticated actor/site/organization scope, current authorization fingerprints, atomic ownership writes, transaction coupling, lease/recovery policy and secret-safe replay. See the Core contract, integration guide and adapter conformance.
Public API, architecture, charter and release record describe the maintained public boundary and consumer compatibility.
Development and releases
composer install composer governance:install composer check composer examples
The complete gate validates public schemas, source/documentation agreement, ownership, behavior and an isolated no-dev authoritative archive consumer. Local fixture composition does not establish durable concurrency or release provenance. Published versions and CI status are linked above; Core validates its actual retained integration suites. Release guidance describes exact dependency identity and independent evidence requirements. Licensed under Apache-2.0.