What problem does it solve?
This Skill eliminates the common frustration of working with OrangeHRM's Symfony-based event system, which requires explicit subscriber registration, strict case-sensitive event naming, and manual priority management that often leads to silent, hard-to-debug failures for new contributors.
Core Features & Use Cases
- Custom Event Creation & Dispatching: Define domain-specific events (like EmployeeSavedEvent or LeaveApply) with immutable payload carriers, and dispatch them from service classes to decouple business logic across plugins.
- Subscriber Development & Registration: Write class-based subscribers that react to events, register them correctly in plugin configuration during boot, and use priority ordering to control execution flow between multiple listeners.
- Event Debugging & Framework Integration: Troubleshoot common issues like non-firing listeners, hook into Symfony KernelEvents for request/response/exception handling, and follow the same patterns used by OrangeHRM's core auth and mailer subscribers.
- Use Case: For example, build a custom plugin that triggers a Slack notification every time a leave request is approved by following the event dispatching and subscriber registration steps outlined in this Skill.
Quick Start
Use the events skill to write and register a subscriber that sends an alert when a new employee is added to the OrangeHRM system.