Skip to content
Development
Skill

/doctrine-fixtures-foundry

Create test data with Zenstruck Foundry v2 factories (PersistentObjectFactory, real objects); define states, sequences, and relationships

From plugin
superpowers-symfony
23344 skills14 agents13 commands1 hook

Claude Code

$ npx -y skills add dev-toolings/superpowers-symfony --skill doctrine-fixtures-foundry --agent claude-code

SKILL.md

doctrine-fixtures-foundry.SKILL.md
name: doctrine-fixtures-foundry
description: Create test data with Zenstruck Foundry v2 factories (PersistentObjectFactory, real objects); define states, sequences, and relationships
capabilities: [read, search, edit, shell]
tags: [doctrine, testing]
# projected by `bun run build` — do not edit by hand
allowed-tools:
  - Read
  - Glob
  - Grep
  - Write
  - Edit
  - Bash

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()`.

Guardrails

  • Use `self::faker()->unique()` for every unique column, or tests collide.
  • Do not call `->object()` or `->_real()`: v2 factories return real objects.
  • Seed Faker (`FOUNDRY_FAKER_SEED`) when a failure must be reproducible.
  • Do not build a factory for trivial data a test can create inline.

Progressive disclosure

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

Output contract

  • Factories with minimal defaults, named states and relation defaults.
  • Stories for shared scenarios, when more than one test needs them.
  • Test setup wired with the Foundry extension and `#[ResetDatabase]`.

References

  • `reference.md`
Read more
@dev-toolings
Ships withsuperpowers-symfony

Superpowers Symfony gives coding agents deep, version-accurate Symfony expertise: from Doctrine schema design and API Platform REST/GraphQL APIs to test-driven development, async Messenger workflows, caching, rate limiting, and clean architecture.

23344 skills14 agents
Get the whole plugin

Stars on GitHub

Momentum

stars in total
233
Star history of dev-toolings/superpowers-symfony on GitHub, a chart by star-history.com

Other skills on superpowers-symfony.

More skills from other plugins.

brainstorming
Auto-invoked

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…

@obra@obraInstall Skill
ask-matt

ask-matt

Ask which skill or flow fits your situation. A router over the skills in this repo.

skills2w309k
@mattpocock@mattpocockInstall Skill
accessibility
Auto-invoked

accessibility

Design, implement, and audit accessible UI to WCAG 2.2 Level AA across Web, iOS, and Android — semantic ARIA roles and labels,…

ecc2w293k
@affaan-m@affaan-mInstall Skill
compiler-commit

compiler-commit

Use when you want to verify compiler changes and commit with the correct convention. Runs tests, lint, and format, then commits…

react5d252k
@facebook@facebookInstall Skill

Questions about doctrine-fixtures-foundry.

Which coding agents can use doctrine-fixtures-foundry?
doctrine-fixtures-foundry installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.