PHPackages                             antismok/domain-events-publisher - 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. antismok/domain-events-publisher

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

antismok/domain-events-publisher
================================

Publisher of domain events implemented on symfony dispatcher component

1.1(7y ago)09.4k1MITPHPPHP ^7.1

Since Oct 28Pushed 7y ago1 watchersCompare

[ Source](https://github.com/antismok/domain-events-publisher)[ Packagist](https://packagist.org/packages/antismok/domain-events-publisher)[ RSS](/packages/antismok-domain-events-publisher/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependencies (2)Versions (3)Used By (1)

domain-events-publisher
=======================

[](#domain-events-publisher)

[![Build Status](https://camo.githubusercontent.com/16ace0ca97f1288e22c0f747ed557ec785995928f8ec5c0985fc78bb0085e905/68747470733a2f2f7472617669732d63692e6f72672f616e7469736d6f6b2f646f6d61696e2d6576656e74732d7075626c69736865722e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/antismok/domain-events-publisher)

Publisher of immutable domain events implemented on symfony dispatcher component.

See [https://symfony.com/doc/current/components/event\_dispatcher.html](https://symfony.com/doc/current/components/event_dispatcher.html)

Usage

```
//....

use Antismok\DomainEventPublisher\DomainEvent;

class UserRegistered implements DomainEvent
{
    private $occurredOn;

    /**
     * @var string $user
     */
    private $userName;

    /**
     * @param string $userName
     */
    function __construct(string $userName)
    {
        $this->useName    = $userName;
        $this->occurredOn = new DateTime();
    }

    public function username(): string
    {
        return $this->username;
    }

    public function occurredOn(): DateTime
    {
        return $this->occurredOn;
    }
}
```

```
//....
class UserRegisteredHandler
{
    public function handle(UserCreated $event)
    {
        //Some operation
    }
}
```

```
//....
//Some config place
DomainEventPublisher::getInstance()->addListener(UserRegistered::class, [new UserRegisteredHandler, 'handle']);

//Some domain place
DomainEventPublisher::getInstance()->publish(new UserRegistered('Roman'));
```

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 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.

###  Release Activity

Cadence

Every ~10 days

Total

2

Last Release

2743d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/e8a891234daa273e34144a2ad846081621df9dd6fc5396727d6d33a38b6778d3?d=identicon)[antismok](/maintainers/antismok)

---

Top Contributors

[![antismok](https://avatars.githubusercontent.com/u/2534034?v=4)](https://github.com/antismok "antismok (3 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/antismok-domain-events-publisher/health.svg)

```
[![Health](https://phpackages.com/badges/antismok-domain-events-publisher/health.svg)](https://phpackages.com/packages/antismok-domain-events-publisher)
```

###  Alternatives

[phpro/soap-client

A general purpose SoapClient library

8885.6M46](/packages/phpro-soap-client)[winzou/state-machine

A very lightweight yet powerful PHP state machine

52113.7M18](/packages/winzou-state-machine)[civicrm/civicrm-core

Open source constituent relationship management for non-profits, NGOs and advocacy organizations.

728272.9k20](/packages/civicrm-civicrm-core)[symfony/ai-platform

PHP library for interacting with AI platform provider.

51927.7k136](/packages/symfony-ai-platform)[codefog/contao-haste

haste extension for Contao Open Source CMS

42650.8k139](/packages/codefog-contao-haste)[netgen/layouts-core

Netgen Layouts enables you to build and manage complex web pages in a simpler way and with less coding. This is the core of Netgen Layouts, its heart and soul.

3689.4k10](/packages/netgen-layouts-core)

PHPackages © 2026

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