willdurand/propel-eventdispatcher-bundle
Symfony2 bundle integrating Propel’s EventDispatcherBehavior. Adds per-model event dispatchers so you only subscribe to relevant Propel lifecycle events, improving separation of concerns and avoiding unnecessary listeners.
EventDispatcherBehavior with Symfony’s event system, enabling seamless integration of domain events into a Symfony application. This is particularly valuable for applications leveraging Propel ORM (e.g., legacy systems or projects requiring Propel’s performance benefits) while adopting Symfony’s ecosystem.EventDispatcherBehavior abstracts event dispatching logic into Propel models, promoting clean separation of concerns and reducing model clutter.EventDispatcher mocking), requiring custom test setups.KernelEvents) or a custom Propel listener layer replace this bundle with less risk?postInsert, preUpdate) and their Symfony equivalents.EventDispatcherBehavior in Propel models (e.g., schema.xml):
<behavior name="eventdispatcher" />
services.yaml):
services:
App\EventListener\PropelModelListener:
tags:
- { name: kernel.event_listener, event: propel.model.event, method: onModelEvent }
EventDispatcherBehavior and Symfony’s EventDispatcher.symfony/propel-bridge if available).stof/doctrine-extensions if Doctrine is also used).composer.json and configure Propel models.postInsert triggers Symfony listeners).EventDispatcher profiler will be critical.postInsert on 1000+ records).@try-catch blocks or Symfony’s EventDispatcher middleware.EventDispatcherBehavior requires schema updates, which can be risky in production. Use zero-downtime migration strategies.EventDispatcherBehavior configuration.How can I help you explore Laravel packages today?