PHPackages                             phpgears/event-sourcing-async - 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. phpgears/event-sourcing-async

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

phpgears/event-sourcing-async
=============================

Event Sourcing base

09PHPCI failing

Since Mar 7Pushed 6y ago1 watchersCompare

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

READMEChangelogDependenciesVersions (1)Used By (0)

[![PHP version](https://camo.githubusercontent.com/d0b5687c6812c5d52d86a548e09db527eeb7860f82adbb677de00a36ddbed1b4/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d253345253344372e312d3838393242462e7376673f7374796c653d666c61742d737175617265)](http://php.net)[![Latest Version](https://camo.githubusercontent.com/c647b3b5b7b1e867ad06ad744004b1db63949b43ec907b478163cd4c44d1ca35/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f70687067656172732f6576656e742d736f757263696e672d6173796e632e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/phpgears/event-sourcing-async)[![License](https://camo.githubusercontent.com/d207dad4daa1f0625cd0f3d973ac8bfb532e5cbf95e2b269761d652bcea10328/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f70687067656172732f6576656e742d736f757263696e672d6173796e632e7376673f7374796c653d666c61742d737175617265)](https://github.com/phpgears/event-sourcing-async/blob/master/LICENSE)

[![Build Status](https://camo.githubusercontent.com/9fd1ea5282c12cafd83f0dd1f113313618d476620d2f8c0087fdefcc2e6d52f6/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f70687067656172732f6576656e742d736f757263696e672d6173796e632e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/phpgears/event-sourcing-async)[![Style Check](https://camo.githubusercontent.com/1c2c970904182b11ea39ee8029cb2ecf4add9f87f77e9cb4bab2968c1fd863d2/68747470733a2f2f7374796c6563692e696f2f7265706f732f3137323630323036302f736869656c64)](https://styleci.io/repos/172602060)[![Code Quality](https://camo.githubusercontent.com/9f77a65691281169048e57375424e56ab780a95c52944010fcee45e317ec96e9/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f70687067656172732f6576656e742d736f757263696e672d6173796e632e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/phpgears/event-sourcing-async)[![Code Coverage](https://camo.githubusercontent.com/cfacddcc31ef162d4276b276830c5dc8bdfe26a144fec274301608c949ca8b18/68747470733a2f2f696d672e736869656c64732e696f2f636f766572616c6c732f70687067656172732f6576656e742d736f757263696e672d6173796e632e7376673f7374796c653d666c61742d737175617265)](https://coveralls.io/github/phpgears/event-sourcing-async)

[![Total Downloads](https://camo.githubusercontent.com/e867bd2806239ea04b355b0c9758569b81e38b524f7ade56e13305122ca61b78/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f70687067656172732f6576656e742d736f757263696e672d6173796e632e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/phpgears/event-sourcing-async/stats)[![Monthly Downloads](https://camo.githubusercontent.com/da26b5cbf3008ff9eef54c0682a6e13a20a763f72520d533bdc9aa317c3190ff/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646d2f70687067656172732f6576656e742d736f757263696e672d6173796e632e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/phpgears/event-sourcing-async/stats)

Event Sourcing Async
====================

[](#event-sourcing-async)

Async decorator for Event Sourcing events and Async Event Bus

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

[](#installation)

### Composer

[](#composer)

```
composer require phpgears/event-sourcing-async

```

Usage
-----

[](#usage)

Require composer autoload file

```
require './vendor/autoload.php';
```

This package adds a new `Gears\EventSourcing\Async\Serializer\JsonEventSerializer` serializer, as a general serializer allowing maximum compatibility in case of events being handled by other systems, to allow `Gears\EventSourcing\Event\AggregateEvent` events to be used in Async event bus

```
use Gears\Event\Async\AsyncEventBus;
use Gears\EventSourcing\Async\Serializer\JsonEventSerializer;
use Gears\Event\Async\Discriminator\ParameterEventDiscriminator;

/* @var \Gears\Event\EventBus $eventBus */

/* @var Gears\Event\Async\EventQueue $eventQueue */
$eventQueue = new CustomEventQueue(new JsonEventSerializer());

$asyncEventBus new AsyncEventBus(
    $eventBus,
    $eventQueue,
    new ParameterEventDiscriminator('async')
);

$asyncEvent = new CustomEvent(['async' => true]);

$asyncEventBus->dispatch($asyncEvent);
```

Refer to [phpgears/event-async](https://github.com/phpgears/event-async) for more information

Contributing
------------

[](#contributing)

Found a bug or have a feature request? [Please open a new issue](https://github.com/phpgears/event-sourcing-async/issues). Have a look at existing issues before.

See file [CONTRIBUTING.md](https://github.com/phpgears/event-sourcing-async/blob/master/CONTRIBUTING.md)

License
-------

[](#license)

See file [LICENSE](https://github.com/phpgears/event-sourcing-async/blob/master/LICENSE) included with the source code for a copy of the license terms.

###  Health Score

17

—

LowBetter than 6% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity34

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% 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/4c50421f1ab4148354dc2dd5dcaba168656b17ea913b310d112deb39a6f73ca1?d=identicon)[juliangut](/maintainers/juliangut)

---

Top Contributors

[![juliangut](https://avatars.githubusercontent.com/u/1104131?v=4)](https://github.com/juliangut "juliangut (7 commits)")

### Embed Badge

![Health badge](/badges/phpgears-event-sourcing-async/health.svg)

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

PHPackages © 2026

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