doctrine-fixtures-foundry

Installation
SKILL.md

Doctrine Fixtures Foundry (Symfony)

Use when

  • Creating test or development data for Doctrine entities.
  • Writing a Foundry factory, a named state, a sequence, or a story.
  • Building related entities for a test without hand-written setup.
  • Migrating legacy Foundry v1 factories or ->object() calls to v2.

Default workflow

  1. Generate a factory per entity and keep defaults() to required and unique fields.
  2. Express each variation as an immutable named state (admin(), published()).
  3. Let factories create default relations with OtherFactory::new().
  4. Group shared scenarios in stories, and reset the database per test class.
  5. Assert on real objects and on the repository through Factory::assert().
Installs
71
GitHub Stars
224
First Seen
Sep 18, 2026