PHP Circuit Breaker Generator
Generates resilient Circuit Breaker patterns for PHP 8.4 to prevent cascading failures in distributed systems.
The Circuit Breaker Generator skill equips your PHP 8.4 projects with professional-grade fault tolerance. By implementing the Circuit Breaker pattern, it provides a safety mechanism that monitors for external service failures and 'trips' the circuit to prevent your system from wasting resources on failing integrations. This skill generates a complete infrastructure including state-aware enums (Closed, Open, HalfOpen), configurable thresholds, factory-based instantiation, and per-service registries, ensuring your PHP architecture remains robust even when external dependencies degrade.
Key Features
01Robust state management with Closed, Open, and HalfOpen transitions
02Per-service registry for managing multiple external API integrations
03Configurable failure thresholds, recovery counts, and timeout durations
04Comprehensive unit test generation for state logic and breaker behavior
0545 GitHub stars
06Automated Circuit Breaker pattern generation for PHP 8.4
Use Cases
01Protecting applications from failing external APIs and payment gateways
02Implementing graceful service degradation with built-in fallback strategies
03Preventing database connection exhaustion during periods of high latency