PHP Chain of Responsibility Pattern Generator
Generates PHP 8.4 Chain of Responsibility infrastructure including handlers, builders, and unit tests for sequential request processing.
This skill automates the implementation of the Chain of Responsibility design pattern in PHP 8.4, enabling developers to build flexible, decoupled request processing pipelines. It generates a complete ecosystem consisting of handler interfaces, abstract base classes for chain linking, concrete implementation templates, and fluent chain builders. Ideal for complex validation logic, multi-step discount systems, or plugin architectures, this skill ensures adherence to SOLID principles and Clean Architecture by providing standardized file placements and naming conventions within your domain layer.
主な機能
01Generates fluent Chain Builders for clean, programmatic assembly of handler sequences.
02Includes automated unit test generation for both individual handlers and full chain integration.
03Scaffolds PHP 8.4 compatible Handler interfaces and abstract base classes.
0445 GitHub stars
05Provides boilerplate for common scenarios like validation pipelines and priority processing.
06Enforces Clean Architecture standards through predefined directory structures and naming conventions.
ユースケース
01Implementing multi-layered business logic like tiered discount or approval workflows.
02Building complex request validation pipelines where multiple rules must be checked sequentially.
03Creating extensible plugin systems where multiple handlers can process a single event.