PHPackages                             ashleydawson/domain-event-dispatcher-bundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. ashleydawson/domain-event-dispatcher-bundle

ActiveSymfony-bundle[Utility &amp; Helpers](/categories/utility)

ashleydawson/domain-event-dispatcher-bundle
===========================================

Symfony bundle to add the domain event dispatcher (singleton)

v1.0.2(9y ago)118.6kMITPHPPHP &gt;=5.5

Since Dec 30Pushed 9y ago1 watchersCompare

[ Source](https://github.com/AshleyDawson/DomainEventDispatcherBundle)[ Packagist](https://packagist.org/packages/ashleydawson/domain-event-dispatcher-bundle)[ RSS](/packages/ashleydawson-domain-event-dispatcher-bundle/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (3)Dependencies (2)Versions (4)Used By (0)

Domain Event Dispatcher Bundle
==============================

[](#domain-event-dispatcher-bundle)

Brings the [domain event dispatcher](https://github.com/AshleyDawson/DomainEventDispatcher) (singleton) to [Symfony](https://symfony.com/) projects. For full usage instructions, [please see the full documentation](https://github.com/AshleyDawson/DomainEventDispatcher/blob/master/README.md)shipped with the library.

Installation
------------

[](#installation)

Install the bundle via [Composer](https://getcomposer.org/):

```
$ composer require ashleydawson/domain-event-dispatcher-bundle

```

Then, register the bundle with the Symfony kernel `app/AppKernel.php`:

```
$bundles = [
    // ...
    new AshleyDawson\DomainEventDispatcherBundle\AshleyDawsonDomainEventDispatcherBundle(),
];
```

Configuration
-------------

[](#configuration)

[Deferred events](https://github.com/AshleyDawson/DomainEventDispatcher/blob/master/README.md#deferred-events) are configured to be dispatched from the Symfony `kernel.terminate` kernel event. To change this, add the following to your `app/config/config.yml` file:

```
ashley_dawson_domain_event_dispatcher:
    dispatch_deferred_events_from_kernel_event: kernel.terminate
    dispatch_deferred_events_from_kernel_event_priority: 0
```

Usage
-----

[](#usage)

Please refer to the full documentation for an in-depth look at how to use the domain event dispatcher. However, please find a simple example below:

Create an event:

```
