PHP Idempotency Handler Generator
Generates robust PSR-15 middleware and Redis-backed storage for safe request deduplication in PHP 8.4 applications.
This skill automates the creation of a complete idempotency handling infrastructure for PHP 8.4 projects, following clean architecture and DDD principles. It generates a PSR-15 compatible middleware that intercepts incoming requests, validates idempotency keys using UUID v4 Value Objects, and utilizes Redis for atomic storage. This infrastructure is essential for building resilient APIs, preventing duplicate operations in payment processing, order fulfillment, and webhook handling by ensuring retried requests are handled safely without side effects while returning cached responses.
Características Principales
0147 GitHub stars
02Includes TTL-based expiration support to manage storage growth
03Provides UUID v4 IdempotencyKey Value Objects for strict validation
04Produces automated Unit Tests for all generated components
05Generates PSR-15 Middleware for seamless HTTP request interception
06Implements Redis-backed storage with atomic SETNX operations
Casos de Uso
01Ensuring safe retries for order creation in e-commerce APIs
02Preventing duplicate charges in payment processing systems
03Deduplicating incoming webhook deliveries from external services