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.twig extension.
  • Replacing the global unstructured array reservationData (and other array<string, mixed> arrays) with specific DTOs with typed properties.
  • Updating Notifiers (ConfirmationEmailNotifier, etc.) to use DTOs and their build() 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 via include).
  • Modifying an existing .html.twig template that is not being migrated (do not break existing emails).
Related skills

More from dayuse-labs/skills-portfolio

Installs
7
GitHub Stars
2
First Seen
Mar 1, 2026