PHP Domain Service Generator

•
45
•

Generates DDD-compliant, stateless Domain Services for PHP 8.4 to handle complex business logic across multiple aggregates.

The Domain Service Generator is a specialized tool for PHP developers practicing Domain-Driven Design (DDD). It automates the creation of stateless, readonly services intended for business operations that span multiple aggregates or require coordination without belonging to a specific entity. By adhering to PHP 8.4 standards, this skill ensures architectural purity by enforcing the separation of domain logic from infrastructure concerns. It generates not only the service class but also comprehensive PHPUnit test templates, helping developers maintain high code quality and test coverage while implementing complex domain policies, calculations, and transformations.

주요 기능

01Provides standardized templates for domain exceptions and business rule enforcement.
0245 GitHub stars
03Enforces DDD best practices including statelessness and repository interface injection.
04Automates the creation of paired PHPUnit test suites for every service.
05Generates PHP 8.4 readonly classes for thread-safe, immutable domain logic.
06Supports complex cross-aggregate coordination patterns like money transfers and order fulfillment.

사용 사례

01Enforcing stateless domain policies such as password complexity requirements or shipping eligibility.
02Coordinating operations between multiple aggregates, such as transferring funds between banking accounts.
03Implementing complex domain calculations like multi-factor pricing engines or tax calculators.