In short.
Doctrine Events is an AI assistant skill for Symfony developers implementing persistence side effects, but its ORM migration claims are unverified and its preUpdate example contradicts its own guardrails. Its strongest feature is a clear progression from entity-local callbacks to service-backed entity listeners and broader lifecycle listeners. It supplies useful implementation sketches and validation commands, but no executed tests, verified compatibility matrix or measured performance results.
Researched and written by an AI model and checked by a second AI model. How it works
Covers content/skills/doctrine-events/SKILL.md and reference.md in full at revision 83522d88f20313c1db6f042a5a49c0e9e0b258b1, together with the captured repository-level LICENSE. Other repository content, build tooling, assistant-host integration, upstream dependency documentation and application behavior are outside this evidence. Nothing was executed; compatibility, registration, persistence behavior, external side effects and performance remain untested.
The overview
Identity
The doctrine-events skill belongs to dev-toolings/superpowers-symfony. Its entry file supplies assistant instructions and points to reference.md for PHP examples, configuration and migration guidance. These are instructional files rather than an executable Symfony extension.
The original folder is [https://github.com/dev-toolings/superpowers-symfony/tree/main/content/skills/doctrine-events]. The supplied snapshot is pinned to revision 83522d88f20313c1db6f042a5a49c0e9e0b258b1.
Assessment
The skill is useful as a starting structure for choosing where persistence-related behavior belongs. It distinguishes logic confined to one entity from logic needing injected services and behavior spanning multiple entity types.
Its technical advice needs checking before adoption. The reference makes categorical ORM migration claims without upstream citations, and its timestamp callback directly changes updatedAt during preUpdate despite its rule requiring changes through the event argument API. Neither compatibility nor runtime correctness is established.
Who it is for
Symfony developers can use it when adding timestamps, slugs, search indexing or notifications around entity persistence. Beginners get an explanation of callbacks versus listeners; experienced developers get attribute syntax, handler signatures, service tags and event argument examples.
It also addresses developers considering an ORM 2 to ORM 3 migration, although its subscriber-removal and argument-class claims require independent verification. Familiarity with PHP entities, dependency injection and database persistence is assumed.
What it covers
The files describe lifecycle callbacks on entities, separate entity listeners with injected services, and global lifecycle listeners that filter incoming entities by type. Examples cover ORM mapping attributes, AsEntityListener, AsDoctrineListener and corresponding YAML service tags.
The reference also covers listener priority, connection scoping, event-specific argument classes, preUpdate change-set access and a proposed subscriber-to-listener migration. These are instructions and examples; no automated migration tool or working application is supplied.
Using it
Requirements
The reference declares ORM 3.x with DoctrineBundle 2.8+ as its target. This is a stated target, not a verified support matrix; exact Symfony and PHP requirements are unspecified.
The skill declares read, search, edit and shell capabilities, with Read, Glob, Grep, Write, Edit and Bash listed as tools. Compatible assistant products and installation locations are not identified. Applying its examples requires a Symfony application using Doctrine; its suggested functional validation additionally requires a real database and PHPUnit.
How it works
The entry file directs an assistant to choose the narrowest suitable mechanism: an entity callback for local logic without services, an entity listener when one entity needs services, or a global listener for broader behavior.
It then proposes attribute registration, event-specific argument typing and a targeted database test. Its expected output includes the handler class, an explanation of the mechanism chosen and validation outcomes. Those outcomes are requested deliverables, not results supplied by the resource.
Setup
Keep SKILL.md and reference.md together when making the skill available to an assistant. The entry file relies on that companion reference, but the supplied folder does not explain host-specific discovery or installation.
For application validation, the reference proposes php bin/console debug:container --tag=doctrine.event_listener and php bin/console debug:container --tag=doctrine.orm.entity_listener, followed by ./vendor/bin/phpunit --filter=Listener. No commands were executed, and no registration or test results are established.
Example use
The search-indexing example registers SearchIndexer for postPersist on the default connection with priority 500. Its handler obtains the entity from PostPersistEventArgs, returns unless it is a Product, and passes matching entities to an injected SearchClient.
This illustrates the proposed global-listener structure and early type check. SearchClient itself, error handling, retries and transaction-aware delivery are not supplied, so the snippet does not establish a complete indexing solution.
Assessment & evidence
Limitations
The claims that ORM 3 removed Doctrine subscribers and replaced the single LifecycleEventArgs class are not independently established by these files. The stated DoctrineBundle version threshold also lacks supporting upstream documentation.
The preUpdate guidance is internally inconsistent: the reference changes updatedAt directly in a callback, while elsewhere allowing only already-changed fields to be adjusted through setNewValue(). It supplies no test resolving that conflict. Listener performance, side-effect reliability and compatibility with a particular application remain unassessed.
Why the approach may help
The scope-based decision rule makes the design choice easier to explain: keep self-contained behavior on the entity, introduce a separate listener when services are needed, and reserve global handling for broader concerns. The examples make those distinctions concrete.
The warnings about nested flush calls and unrestricted global handlers identify specific implementation risks. Their inclusion is useful guidance, but does not demonstrate that assistant-generated code will follow them or behave correctly.
Alternatives
The reference compares three implementation choices: callbacks without injected services, entity listeners for one entity class, and lifecycle listeners for broader behavior. It also supplies YAML registration as an alternative to attributes.
Developers can read reference.md directly without loading the assistant skill. No evidence compares this resource with other assistant skills, Symfony extensions or external tutorials.
Evidence
The source material consists of the complete selected SKILL.md and reference.md, plus the repository-level LICENSE, at revision 83522d88f20313c1db6f042a5a49c0e9e0b258b1. These files establish the skill's instructions, examples and reuse terms; they contain no executed test results or performance measurements.
The pinned originals are [https://raw.githubusercontent.com/dev-toolings/superpowers-symfony/83522d88f20313c1db6f042a5a49c0e9e0b258b1/content/skills/doctrine-events/SKILL.md] and [https://raw.githubusercontent.com/dev-toolings/superpowers-symfony/83522d88f20313c1db6f042a5a49c0e9e0b258b1/content/skills/doctrine-events/reference.md].
Access & freshness
Costs
No purchase price, assistant pricing or operating-cost measurements are supplied. Model usage, database testing and any external search or notification service costs remain unknown.
The reference ranks callbacks and listeners by relative execution cost, but supplies no benchmark method or measurements. Those rankings should be treated as qualitative guidance.
Licence and reuse
The captured repository LICENSE grants MIT permission to use, copy, modify, publish, distribute, sublicense and sell the software and associated documentation. Copies or substantial portions must retain the copyright and permission notices.
The licence disclaims warranties and liability. No separate licence notice for the selected folder is supplied. The original notice is available at [https://raw.githubusercontent.com/dev-toolings/superpowers-symfony/83522d88f20313c1db6f042a5a49c0e9e0b258b1/LICENSE].
Freshness
The supplied snapshot was captured on 17 November 2026 at 06:19:22.900 UTC. That timestamp identifies the snapshot, not a release date or proof of current framework compatibility.
The pinned revision fixes the content described here; the main-branch folder may subsequently differ. Compatibility with newer Doctrine, DoctrineBundle or Symfony releases is unknown.
Before adopting it
Verify the subscriber, argument-class and attribute-availability claims against upstream documentation matching the application's installed package versions. Resolve the preUpdate timestamp inconsistency before using that example.
Start with one narrowly scoped handler, confirm its service registration and add a targeted functional test using a real database. For search or notification side effects, establish the required transaction and failure behavior before extending the supplied sketches.
