initial
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
---
|
||||
globs: src/UI/**/*.php
|
||||
description: Defines best practices for handling HTTP requests in Symfony 7.
|
||||
Ensures strict separation of concerns by transforming raw request data into
|
||||
immutable DTOs at the boundary of the UI layer, preventing leakage of
|
||||
infrastructure details into business logic.
|
||||
alwaysApply: true
|
||||
---
|
||||
|
||||
The Request object must only be used in the UI layer (Controllers). Immediately convert request data into DTOs located in /src/Logic/[FeatureName]/DTO before passing them to UseCases. Use $request->getPayload() for JSON APIs, $request->query/request for forms, and $request->attributes for route parameters. Never pass the Request object to Logic or Data layers.
|
||||
Reference in New Issue
Block a user