DDD Specification Generator

•
45
•

Generates Domain-Driven Design (DDD) specification objects for PHP 8.4 to encapsulate business rules and complex filtering logic.

This skill automates the implementation of the Specification pattern in PHP 8.4 applications, enabling developers to build reusable, composable, and testable business rule objects. By adhering to DDD principles, it decouples domain logic from infrastructure, providing a standardized way to handle validation, collection filtering, and repository queries using a ubiquitous language. The skill generates a complete infrastructure including interfaces, abstract classes, and composite patterns (AND, OR, NOT), alongside isolated unit tests to ensure business rule accuracy and architectural integrity.

主要功能

01Implements the Composite pattern for complex AND, OR, and NOT rule combinations
02Standardizes file placement within Domain-Driven Design folder structures
03Includes automated unit test generation for every specification created
04Generates PHP 8.4 type-safe Specification interfaces and base classes
05Creates concrete business rule objects aligned with the Ubiquitous Language
0645 GitHub stars

使用场景

01Encapsulating complex business validation logic like eligibility or cancellation rules
02Enforcing consistent domain policies across different layers of a PHP application
03Creating reusable, in-memory filters for collections and repository query criteria