PHPackages                             solilokiam/async-event-dispatcher - 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. solilokiam/async-event-dispatcher

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

solilokiam/async-event-dispatcher
=================================

An asynchronous event dispatcher for symfony

21PHP

Since Oct 25Pushed 11y ago2 watchersCompare

[ Source](https://github.com/solilokiam/asynceventdispatcher)[ Packagist](https://packagist.org/packages/solilokiam/async-event-dispatcher)[ RSS](/packages/solilokiam-async-event-dispatcher/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (2)Used By (0)

AsyncEventDispatcher Component
==============================

[](#asynceventdispatcher-component)

[![Build Status](https://camo.githubusercontent.com/82c4cb1fbb7ece05dd625f13a7eee96cbabb59d45cbe34157d1c867e981b2160/68747470733a2f2f7472617669732d63692e6f72672f736f6c696c6f6b69616d2f6173796e636576656e74646973706174636865722e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/solilokiam/asynceventdispatcher)[![SensioLabsInsight](https://camo.githubusercontent.com/b5ba21d180eac0de80c25760357bbc28192d3d993add69952427ea0553f9f1db/68747470733a2f2f696e73696768742e73656e73696f6c6162732e636f6d2f70726f6a656374732f61633139336361352d633839342d343761632d623163372d3132633264396533313132342f6d696e692e706e67)](https://insight.sensiolabs.com/projects/ac193ca5-c894-47ac-b1c7-12c2d9e31124)[![Dependency Status](https://camo.githubusercontent.com/332c3aa33ba890a017c8d079487ce5ec4d722168049754fa3ca0d46048f8e179/68747470733a2f2f7777772e76657273696f6e6579652e636f6d2f757365722f70726f6a656374732f3534346263343434393761653338386134363030303132302f62616467652e7376673f7374796c653d666c6174)](https://www.versioneye.com/user/projects/544bc44497ae388a46000120)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/fdb889189c29242056cfeb6c9095cf3c1fd13d14599ea0ef0d577a8215c5b189/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f736f6c696c6f6b69616d2f6173796e636576656e74646973706174636865722f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/solilokiam/asynceventdispatcher/?branch=master)

This component is an async event dispatcher based on the Symfony's event dispatcher component but in a fire and forget way. Right now it needs Redis to work but if you use another queue system it's really easy to extend and use.

Warning
-------

[](#warning)

This code is not ready for production. This is still a Work in progress, things may change a lot over time.

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

[](#installation)

### Using composer

[](#using-composer)

Add following lines to your `composer.json` file:

```
"require": {
      ...
      "solilokiam/async-event-dispatcher": "dev-master"
    },
```

How do you dispatch events?
---------------------------

[](#how-do-you-dispatch-events)

If you've already used symfony event dispatcher it's really simple to use. First you need to create your own event. This event must extend `AsyncEvent` . Once you've got your event created you need to dispatch it using the `AsyncEventDispatcher`. You need to inject an object that implements `EventDriverInterface` when you instantiate the `AsyncEventDispatcher` class. This component provides you with a RabbitMq implementation of the interface. Feel free to create your own if you need it.

In the following example you can see how to do it:

```
namespace Foo\Events;

use Solilokiam\AsyncEventDispatcher\AsyncEvent;

class FooAsyncEvent extends AsyncEvent
{
    protected $foo;

    public function setFoo($value)
    {
        $this->foo = $value;

        return $this;
    }

    public function getFoo()
    {
        return $this->foo;
    }
}
```

```
$redirEventDriver = new RedisDriver($redisConfig);

$asyncEventDispatcher = new AsyncEventDispatcher($redisEventDriver);

$fooEvent = new FooAsyncEvent();
$fooEvent->setFoo('whatever');

$dispatcher->dispatch('foo.event', $fooEvent);
```

How do you define event listeners?
----------------------------------

[](#how-do-you-define-event-listeners)

TODO

How do you consume dispatcher events?
-------------------------------------

[](#how-do-you-consume-dispatcher-events)

TODO

License
-------

[](#license)

AsyncEventDispatcher is licensed under the MIT License. See the LICENSE file for full details.

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity43

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 97.4% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/3dae316f71c5e5ec502f548d781a561d0e7080ad4af248f92cdbd3a1ff75295f?d=identicon)[solilokiam](/maintainers/solilokiam)

---

Top Contributors

[![solilokiam](https://avatars.githubusercontent.com/u/650592?v=4)](https://github.com/solilokiam "solilokiam (37 commits)")[![scrutinizer-auto-fixer](https://avatars.githubusercontent.com/u/6253494?v=4)](https://github.com/scrutinizer-auto-fixer "scrutinizer-auto-fixer (1 commits)")

### Embed Badge

![Health badge](/badges/solilokiam-async-event-dispatcher/health.svg)

```
[![Health](https://phpackages.com/badges/solilokiam-async-event-dispatcher/health.svg)](https://phpackages.com/packages/solilokiam-async-event-dispatcher)
```

###  Alternatives

[sylius-labs/polyfill-symfony-framework-bundle

Symfony FrameworkBundle Polyfill

135.9M2](/packages/sylius-labs-polyfill-symfony-framework-bundle)[roots/bedrock-disallow-indexing

Disallow indexing of your site on non-production environments

134.0M32](/packages/roots-bedrock-disallow-indexing)[pixelant/pxa-newsletter-subscription

Newsletter Subscription

1710.1k1](/packages/pixelant-pxa-newsletter-subscription)[enlitepro/zf2-scaffold

1022.5k3](/packages/enlitepro-zf2-scaffold)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
