From superpowers-symfony
React to Doctrine entity lifecycle events in Symfony using attribute listeners and lifecycle callbacks. Helps with timestamps, slugs, search indexing, and notifications.
How this skill is triggered — by the user, by Claude, or both
Slash command
/superpowers-symfony:doctrine-eventsThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
- You need side effects on entity persistence (timestamps, slugs, search indexing, notifications).
EventSubscriberInterface Doctrine subscriber to ORM 3.#[ORM\HasLifecycleCallbacks], #[AsEntityListener], #[AsDoctrineListener]).PostPersistEventArgs, PreUpdateEventArgs, …).EventSubscriberInterface Doctrine subscribers — never reintroduce them.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.reference.md for the three mechanisms, the event-args matrix, and migration from subscribers.reference.mddocs/complexity-tiers.mdnpx claudepluginhub makfly/superpowers-symfony --plugin superpowers-symfonyHandles Doctrine transaction management including ORM 3 wrapInTransaction, optimistic/pessimistic locking, flush strategies, and transaction boundaries.
Provides Symfony framework reference with architecture patterns, DDD integration, clean architecture checklists, common violations, and antipatterns for auditing PHP projects.
Implements Clean Architecture, Hexagonal (Ports & Adapters), and Domain-Driven Design patterns in PHP 8.3+ with Symfony 7.x. For enterprise app architecture, legacy refactoring, DDD, and testable backends.