The PHP Immutability Analyzer is a specialized diagnostic tool designed for projects utilizing Domain-Driven Design (DDD), Hexagonal, or Clean Architecture. It automatically scans your codebase to identify architectural anti-patterns, such as missing readonly keywords, unauthorized setters, and the use of mutable DateTime objects. By enforcing strict immutability for Value Objects, Domain Events, and DTOs, this skill helps developers maintain thread safety and predictable state, providing a comprehensive compliance report with actionable refactoring recommendations aligned with modern PHP 8.2+ standards.
주요 기능
0145 GitHub stars
02Flagging of mutable DateTime usage in favor of DateTimeImmutable
03Validates 'wither' pattern implementation for state transitions
04Identifies illegal setter methods and state mutations outside of constructors
05Generates detailed compliance reports with architectural health scores
06Detects missing 'readonly' and 'final' modifiers on immutable domain components