skillZs
★ LIVE SKILL TAGS ★
>>> LIVE SKILLS INDEX <<<
* OPEN SOURCE *
NO LOGIN, NO TRACKING
※ REAL INSTALL DATA ※
← back to all skills
dev-toolings/superpowers-symfony115 installs

value-objects-and-dtos

Design Value Objects for domain concepts and DTOs for data transfer with proper immutability (readonly) and validation

How do I install this agent skill?

npx skills add https://github.com/dev-toolings/superpowers-symfony --skill value-objects-and-dtos
view source ↗

Is this agent skill safe to install?

  • Gen Agent Trust Hubpass

    This skill provides architectural guidance and code templates for implementing Value Objects and Data Transfer Objects (DTOs) in Symfony applications. It contains only documentation, code examples, and standard configuration snippets for PHP, Doctrine, and Symfony, following industry best practices for data validation and immutability. No security issues were detected.

  • Socketpass

    No alerts

  • Snykpass

    Risk: LOW · No issues

What does this agent skill do?

Value Objects And Dtos (Symfony)

Use when

  • A domain concept with rules of its own (money, email, address) travels as raw scalars.
  • Data crosses a boundary: request input, API output, message payload.
  • Storing a value object inside a Doctrine entity.

Default workflow

  1. Decide: a value object for a domain concept with invariants, a DTO for data crossing a boundary.
  2. Make it readonly, validate in the constructor, and fail fast.
  3. Give value objects equality by value and operations that return new instances.
  4. Persist value objects as Doctrine embeddables.
  5. Keep input DTOs (validation constraints) apart from output DTOs (serializer attributes).

Guardrails

  • No setters and no mutation: a change returns a new instance.
  • DTOs carry data only, with no behavior.
  • Never expose entities directly as API input or output.
  • Store money as an integer in minor units, never as a float.

Progressive disclosure

  • Use this file for execution posture and risk controls.
  • Open references when deep implementation details are needed.

Output contract

  • Value objects with their invariants and equality.
  • Input and output DTOs, and their mapping to and from entities.
  • Unit tests for each invariant.

References

  • reference.md

Add the canonical catalog link to the repository README so users can inspect current installs and available audits. The publishing guide covers the complete discovery path.

<a href="https://skillzs.dev/skills/dev-toolings/superpowers-symfony/value-objects-and-dtos">View value-objects-and-dtos on skillZs</a>