symfony:event

Generate Symfony Event classes and EventSubscriber or EventListener handlers.

Updated Feb 24, 2026
One-click install
npx skills add https://github.com/atournayre/claude-personas --skill symfony-event
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: symfony:event
Source: https://github.com/atournayre/claude-personas/tree/main/symfony/skills/event
Command: npx skills add https://github.com/atournayre/claude-personas --skill symfony-event

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill automates the creation of custom Symfony Events and their corresponding EventSubscribers or EventListeners, adhering to best practices and streamlining event-driven architecture in Symfony applications.

Core Features & Use Cases

  • Event Generation: Creates immutable Event classes with promoted properties and getters.
  • Handler Creation: Generates either an EventSubscriber (recommended for multiple events) or an EventListener (using #[AsEventListener] attribute).
  • Namespace Detection: Automatically detects the project's namespace from composer.json or defaults to App.
  • Stoppable Events: Supports the creation of stoppable events for conditional propagation.
  • Use Case: Quickly scaffold the necessary classes when a new business event occurs, such as OrderPlaced or UserRegistered, ensuring consistent implementation.

Quick Start

Use the symfony:event skill to generate a new event named OrderPlaced with associated data and a recommended EventSubscriber.

Frequently Asked Questions about symfony:event

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate Symfony event classes and handlers automatically?

To generate Symfony event classes and handlers, use this Skill to scaffold immutable Event classes with promoted properties and automatically create the associated EventSubscriber or EventListener handlers.

When should I use a Symfony EventSubscriber versus an EventListener?

Use a Symfony EventSubscriber when handling multiple events, as it is the recommended approach for event-driven architecture. Use an EventListener with the #[AsEventListener] attribute when handling a single event.

Can I create stoppable Symfony events for conditional propagation?

Yes, you can create stoppable Symfony events for conditional propagation. The Skill supports configurable event data and allows you to specify whether event propagation should be stoppable.

How does the Skill detect the namespace for generated Symfony events?

The Skill detects the project namespace automatically by reading the composer.json file. If no namespace is found, it defaults to using the App namespace for the generated PHP classes.

Does this work with standard Symfony event-driven architecture practices?

Yes, it works with standard Symfony event-driven architecture practices by automating the creation of event classes and handlers, ensuring consistent implementation and adhering to best practices for business events.