MCPInstall

symfony:doctrine-events

React to Doctrine entity lifecycle in Symfony with attribute listeners ([AsDoctrineListener]/[AsEntityListener], ORM 3) and lifecycle callbacks

Installs
147
Last 24h
—
Trending rank
—
Security
Not audited

Install

Works with every agent the skills CLI supports.

npx skills add https://github.com/dev-toolings/superpowers-symfony --skill symfony:doctrine-events
  1. 01

    Install

    Run the command in your project. The CLI asks which agents to install for.

  2. 02

    Describe the task

    Ask your agent for something this skill covers. It loads symfony:doctrine-events automatically when relevant.

  3. 03

    Review the result

    The agent follows the SKILL.md steps, scripts and references bundled with the skill.

SKILL.md

The instructions your agent reads when the skill is triggered.

Doctrine Events (Symfony)

Use when

  • You need side effects on entity persistence (timestamps, slugs, search indexing, notifications).
  • Migrating an EventSubscriberInterface Doctrine subscriber to ORM 3.
  • Choosing between lifecycle callbacks, entity listeners, and global lifecycle listeners.

Default workflow

  1. Pick the narrowest mechanism: callback (one entity, no deps) → entity listener (one entity, needs services) → lifecycle listener (cross-cutting, all entities).
  2. Wire it with attributes (#[ORM\HasLifecycleCallbacks], #[AsEntityListener], #[AsDoctrineListener]).
  3. Type the event argument by its per-event class (PostPersistEventArgs, PreUpdateEventArgs, …).
  4. Verify the side effect fires with a targeted functional test against a real DB.

Guardrails

  • ORM 3.0 removed EventSubscriberInterface Doctrine subscribers — never reintroduce them.
  • Type-check the entity early in a global lifecycle listener (it fires for every entity).
  • Never call flush() inside a Doctrine event handler — it corrupts the in-flight unit of work.
  • preUpdate is restricted: change fields only via $args->setNewValue(), never touch associations.

Progressive disclosure

  • Use this file for execution posture and risk controls.
  • Open reference.md for the three mechanisms, the event-args matrix, and migration from subscribers.

Output contract

  • Listener/callback class with the correct attribute.
  • Justification for the chosen mechanism.
  • Validation outcomes (test that the side effect fired).

References

  • reference.md
  • docs/complexity-tiers.md

FAQ

What does the symfony:doctrine-events skill do?

React to Doctrine entity lifecycle in Symfony with attribute listeners ([AsDoctrineListener]/[AsEntityListener], ORM 3) and lifecycle callbacks

How do I install symfony:doctrine-events?

Run npx skills add https://github.com/dev-toolings/superpowers-symfony --skill symfony:doctrine-events in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/symfony:doctrine-events/ (personal) or .claude/skills/symfony:doctrine-events/ (project).

Which AI agents can use symfony:doctrine-events?

Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.

Is symfony:doctrine-events safe to install?

No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.

Who maintains symfony:doctrine-events?

It is published by dev-toolings in dev-toolings/superpowers-symfony. It has 147 recorded installs.

More from dev-toolings/superpowers-symfony

View all →

symfony:interfaces-and-autowiring

dev-toolings/superpowers-symfony

Master Symfony Dependency Injection with autowiring,

Security708 installs

symfony:controller-cleanup

dev-toolings/superpowers-symfony

Refactor fat controllers into lean ones by extracting business logic to services, handlers, and invokable commands

symfony:doctrine-migrations

dev-toolings/superpowers-symfony

Create and manage Doctrine migrations (lib 4.x) for schema versioning; handle dependencies, rollbacks, and production deployment

DevOps & Cloud641 installs

symfony:tdd-with-phpunit

dev-toolings/superpowers-symfony

Apply RED-GREEN-REFACTOR with PHPUnit 10/11 for Symfony; KernelTestCase/WebTestCase, attributes ([Test]/[DataProvider]), Foundry

Testing & QA634 installs

symfony:quality-checks

dev-toolings/superpowers-symfony

Run code quality tools: PHP-CS-Fixer for style, PHPStan for static analysis, and type safety checks

Backend & APIs622 installs

symfony:doctrine-relations

dev-toolings/superpowers-symfony

Define Doctrine entity relationships (OneToMany, ManyToMany, ManyToOne); configure cascade, orphan removal, multiple entity managers; prevent N+1 queries

612 installs

Popular frontend & design skills

View category →

setup-matt-pocock-skills

mattpocock/skills

Configure this repo for the engineering skills: set up its issue tracker, triage label vocabulary, and domain doc layout. Run once before first use of the other engineering skills.

Frontend & Design1.1M installs

frontend-design

anthropics/skills

Guidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults.

OfficialFrontend & Design1M installs

hyperframes-animation

heygen-com/hyperframes

All animation knowledge for HyperFrames — atomic motion rules, multi-phase scene blueprints, scene transitions, broader motion-design techniques, AND the seven runtime adapters (GSAP default, plus Lottie, Three.js, Anime.js, CSS keyframes, Web Animations API, TypeGPU). Use for any motion or animation task: pick 2-4 rules and compose, or load a blueprint, or look up runtime-specific API (e.g. GSAP eases / Lottie player / Three.js mixer). Also covers auditing an existing composition's choreography (animation map) and 24 named text-animation effects. HyperFrames-native: single paused timeline, seek-safe, deterministic.

prototype

mattpocock/skills

Build a throwaway prototype to answer a design question. Use when the user wants to sanity-check whether a state model or logic feels right, or explore what a UI should look like.

Frontend & Design999.2K installs

hyperframes-core

heygen-com/hyperframes

The HyperFrames composition contract — build one renderable project. Use for composition structure, the data- timing attributes, class="clip", tracks, sub-compositions, variables, framework-owned media playback, deterministic-render rules, and validation. Read before writing composition HTML.

Frontend & Design930.5K installs

vercel-react-best-practices

vercel-labs/agent-skills

React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.

OfficialFrontend & Design843.1K installs