Symfony Doctrine Events
Reagiert auf den Doctrine-Entitätslebenszyklus in Symfony mit ORM 3 Attribut-Listenern
Getestet · Funktioniert
Was es kann
Leitet side effects auf Doctrine entity persistence in Symfony (timestamps, slugs, search indexing, notifications) mithilfe von ORM 3 attribute listeners: #[AsDoctrineListener], #[AsEntityListener] und lifecycle callbacks. Wird ausgelöst, wenn Sie persistence side effects benötigen, zwischen den three mechanisms wählen oder einen ORM 2 EventSubscriber zu ORM 3 migrieren.
Testbericht
Es wurde gebeten, bei einer User update in Doctrine ORM 3 zu benachrichtigen: Die skill forces the current #[AsEntityListener] + typed PostUpdateEventArgs und blocks the three real ORM-3 traps a plain answer falls into — the removed EventSubscriberInterface, the old single LifecycleEventArgs, und a fatal flush() inside the handler. Every claim in the bundled reference.md (subscribers removed in ORM 3.0, AsDoctrineListener since DoctrineBundle 2.8) checks out against the framework.
Getestet am: 2026-07-24 · Claude Code 2.x (agent harness)
Installation
git clone https://github.com/MakFly/superpowers-symfony mkdir -p ~/.claude/skills cd superpowers-symfony && cp -r skills/doctrine-events ~/.claude/skills/symfony-doctrine-events
Befehle & Beispiel-Prompts
/symfony-doctrine-eventsReagiert auf den Doctrine-Entitätslebenszyklus in Symfony mit ORM 3 Attribut-Listenern
Skills reagieren auf normale Anfragen — keine Slash-Befehle nötig. Nach der Installation aktivieren Prompts wie diese den Skill (auf Englisch):
Add a slug generator that runs on entity persist in SymfonyWhich Doctrine listener should I use for auto timestamps?Migrate this ORM 2 EventSubscriber to ORM 3 attributes