This commit is contained in:
2026-06-10 18:22:27 +02:00
parent 7f31b63aaa
commit 83b475987c
50 changed files with 2550 additions and 11 deletions
@@ -0,0 +1,8 @@
---
globs: src/Logic/**/UseCase/*.php, src/Logic/**/DTO/*.php
description: Enforces the use of DTOs for UseCase entry points to maintain clean
architecture, immutability, and type safety.
alwaysApply: true
---
UseCase methods must accept DTOs (Data Transfer Objects) for input parameters instead of raw arrays or Request objects. DTOs must be located in the /src/Logic/[FeatureName]/DTO directory and should be immutable (readonly properties). This ensures decoupling between the Logic and UI layers. Simple primitive inputs (like a single ID) may be passed directly, but complex data structures require DTOs.