PHPackages                             macs/rad-domain-event - 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. macs/rad-domain-event

ActiveLibrary

macs/rad-domain-event
=====================

Provide RAD Domain Event component

v3.0.0(6y ago)023MITPHPPHP \*

Since Jun 24Pushed 6y agoCompare

[ Source](https://github.com/MindesignGCV/rad-domain-event)[ Packagist](https://packagist.org/packages/macs/rad-domain-event)[ RSS](/packages/macs-rad-domain-event/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependencies (5)Versions (9)Used By (0)

Knp Rad Domain Event
====================

[](#knp-rad-domain-event)

[![Build Status](https://camo.githubusercontent.com/304f1a503ac55cae50949b895ba56ee8d568222d69ae918a763a42de3872effb/68747470733a2f2f7472617669732d63692e6f72672f4b6e704c6162732f7261642d646f6d61696e2d6576656e742e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/KnpLabs/rad-domain-event)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/8f9ae3b6be45997798220b4abb3305b213b07b500e93ff57ed8b221803025b76/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f4b6e704c6162732f7261642d646f6d61696e2d6576656e742f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/KnpLabs/rad-domain-event/?branch=master)[![Latest Stable Version](https://camo.githubusercontent.com/86e1e7f6a8db35d5ff2cd4c1a03fb451eb906037ddce8e9b12ae31284cc94c86/68747470733a2f2f706f7365722e707567782e6f72672f6b6e706c6162732f7261642d646f6d61696e2d6576656e742f762f737461626c65)](https://packagist.org/packages/knplabs/rad-domain-event) [![Total Downloads](https://camo.githubusercontent.com/47eb94240244ef86293eccadc95ee679010e6398b76d0f4c760af5ed4382b5d9/68747470733a2f2f706f7365722e707567782e6f72672f6b6e706c6162732f7261642d646f6d61696e2d6576656e742f646f776e6c6f616473)](https://packagist.org/packages/knplabs/rad-domain-event) [![Latest Unstable Version](https://camo.githubusercontent.com/01decb2a66a6c7615f977c3fa1b991819604f86c2123b446a3594d9adac3e61f/68747470733a2f2f706f7365722e707567782e6f72672f6b6e706c6162732f7261642d646f6d61696e2d6576656e742f762f756e737461626c65)](https://packagist.org/packages/knplabs/rad-domain-event) [![License](https://camo.githubusercontent.com/1ce5d6b2ec5632fddb5dc3af72308e4947a13b9c4bc7c727dad35dd4fd993e0e/68747470733a2f2f706f7365722e707567782e6f72672f6b6e706c6162732f7261642d646f6d61696e2d6576656e742f6c6963656e7365)](https://packagist.org/packages/knplabs/rad-domain-event)

A lightweight domain event pattern implementation for Doctrine2.

Official maintainers:
=====================

[](#official-maintainers)

- [@Einenlum](https://github.com/Einenlum)

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

[](#installation)

With composer :

```
$ composer require knplabs/rad-domain-event
```

If you are using Symfony you can update your `app/AppKernel.php` file:

```
public function registerBundles()
{
    $bundles = array(
        // bundles here ...
        new Knp\Rad\DomainEvent\Bundle\DomainEventBundle();
    );
}
```

Usage
-----

[](#usage)

### Setup your entity

[](#setup-your-entity)

First, make sure your entity implements the [Provider](./src/Knp/Rad/DomainEvent/Provider.php) interface and uses the [ProviderTrait](./src/Knp/Rad/DomainEvent/ProviderTrait.php).

```
use Knp\Rad\DomainEvent;

class MyEntity implements DomainEvent\Provider
{
    use DomainEvent\ProviderTrait;
}
```

### Raise event

[](#raise-event)

Trigger any event from your entity, through the `raise` method. It will be turned into a [Knp\\Rad\\DomainEvent\\Event](./src/Knp/Rad/DomainEvent/Event.php) object and dispatched once your entity has been flushed.

```
use Knp\Rad\DomainEvent;

class MyEntity implements DomainEvent\Provider
{
    // ...
    public function myFunction($arg) {
        // your function behavior
        $this->raise('myEventName', ['anyKey' => $anyValue]);
    }
}
```

### Listen to this event

[](#listen-to-this-event)

```
use Knp\Rad\DomainEvent\Event;

class MyListener
{
    public function onMyEventName(Event $event) {
        // your function behavior
    }
}
```

Then, of course, register your listener.

```
app.event_listener.my_event_listener:
    class: App\EventListener\MyEventListener
    tags:
        - { name: kernel.event_listener, event: myEventName, method: 'onMyEventName' }
```

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity68

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

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 ~247 days

Recently: every ~368 days

Total

8

Last Release

2246d ago

Major Versions

0.1.0 → 1.0.02015-11-30

1.0.x-dev → v2.0.02016-03-04

v2.1.1 → v3.0.02020-03-18

PHP version history (3 changes)2.0.1PHP &gt;=5.4

v2.1.0PHP ~7.0

v3.0.0PHP \*

### Community

Maintainers

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

---

Top Contributors

[![Shivoham](https://avatars.githubusercontent.com/u/1434539?v=4)](https://github.com/Shivoham "Shivoham (3 commits)")[![polc](https://avatars.githubusercontent.com/u/3513348?v=4)](https://github.com/polc "polc (2 commits)")[![gquemener](https://avatars.githubusercontent.com/u/668604?v=4)](https://github.com/gquemener "gquemener (1 commits)")[![kubk](https://avatars.githubusercontent.com/u/22447849?v=4)](https://github.com/kubk "kubk (1 commits)")[![PedroTroller](https://avatars.githubusercontent.com/u/1766827?v=4)](https://github.com/PedroTroller "PedroTroller (1 commits)")

### Embed Badge

![Health badge](/badges/macs-rad-domain-event/health.svg)

```
[![Health](https://phpackages.com/badges/macs-rad-domain-event/health.svg)](https://phpackages.com/packages/macs-rad-domain-event)
```

###  Alternatives

[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M651](/packages/sylius-sylius)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.3M152](/packages/sulu-sulu)[prestashop/prestashop

PrestaShop is an Open Source e-commerce platform, committed to providing the best shopping cart experience for both merchants and customers.

9.0k15.4k](/packages/prestashop-prestashop)[sonata-project/entity-audit-bundle

Audit for Doctrine Entities

644989.8k1](/packages/sonata-project-entity-audit-bundle)[codefog/contao-haste

haste extension for Contao Open Source CMS

42650.8k139](/packages/codefog-contao-haste)[open-dxp/opendxp

Content &amp; Product Management Framework (CMS/PIM)

7310.3k29](/packages/open-dxp-opendxp)

PHPackages © 2026

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