dayuse-mail
Installation
SKILL.md
Dayuse Mail — DTO Pattern
Overview
Modernization pattern for Dayuse transactional emails: replace unstructured arrays (reservationData, array<string, mixed>) with strictly typed PHP DTOs (final readonly class) with a static build() method, and .dto.html.twig templates with zero business logic.
When to Use This Skill
- Refactoring legacy transactional email templates (
.html.twig). - Migrating templates to the
.dto.html.twigextension. - Replacing the global unstructured array
reservationData(and otherarray<string, mixed>arrays) with specific DTOs with typed properties. - Updating Notifiers (
ConfirmationEmailNotifier, etc.) to use DTOs and theirbuild()method.
When NOT to Use
- Marketing emails or newsletters (handled by another system).
- Purely static templates (no Twig variables: no
{{ var }}, no{% if var %}, no parameters received viainclude). - Modifying an existing
.html.twigtemplate that is not being migrated (do not break existing emails).