Skip to content

docs(conventions): fix Domain DTO location — must be inside Service context#57

Merged
prikotov merged 1 commit into
masterfrom
task/fix-domain-dto-path
May 24, 2026
Merged

docs(conventions): fix Domain DTO location — must be inside Service context#57
prikotov merged 1 commit into
masterfrom
task/fix-domain-dto-path

Conversation

@prikotov
Copy link
Copy Markdown
Owner

Проблема

Конвенция DTO разрешала Domain\Dto\{Name}Dto — это подразумевало общие доменные DTO, что неверно. DTO в Domain всегда привязан к конкретному сервису.

Решение

Путь исправлен на Domain\Service\{ServiceName}\{Name}Dto — в соответствии с примером в конвенции Service (Domain\Service\FxRate\FxRateDto).

Чек-лист

  • composer check пройден

@prikotov prikotov force-pushed the task/fix-domain-dto-path branch 4 times, most recently from 0cb44c2 to 322d777 Compare May 24, 2026 11:35
- DtoStructureSniff: error when Domain DTO is in Domain/Dto/ instead of
  Domain/Service/{ServiceName}/
- ServiceStructureSniff: allow classes with Dto suffix in Service/ directory
  (already allowed: Helper, Factory)
- Added todo task for path validation of other layers (Application,
  Infrastructure, Integration, Presentation)
@prikotov prikotov force-pushed the task/fix-domain-dto-path branch from 322d777 to faf2960 Compare May 24, 2026 11:36
@prikotov prikotov merged commit 5245de3 into master May 24, 2026
3 checks passed
@prikotov prikotov deleted the task/fix-domain-dto-path branch May 24, 2026 11:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant