PHPackages                             andy-thorne/domain-events-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. andy-thorne/domain-events-bundle

AbandonedArchivedSymfony-bundle

andy-thorne/domain-events-bundle
================================

Domain events for Doctrine ODM and ORM

2.0.0(4y ago)0536MITPHPPHP ^8.0

Since Jun 28Pushed 4y ago1 watchersCompare

[ Source](https://github.com/andythorne/domain-events)[ Packagist](https://packagist.org/packages/andy-thorne/domain-events-bundle)[ RSS](/packages/andy-thorne-domain-events-bundle/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (3)Dependencies (15)Versions (5)Used By (0)

Symfony Domain Events Bundle
============================

[](#symfony-domain-events-bundle)

This bundle adds Domain Event dispatching on doctrine events via a [MessageBus](https://symfony.com/doc/current/components/messenger.html).

[![CI](https://github.com/andythorne/domain-events/workflows/CI/badge.svg)](https://github.com/andythorne/domain-events/workflows/CI/badge.svg)

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

[](#installation)

```
composer require andy-thorne/domain-events-bundle
```

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

[](#configuration)

```
# Defaults
domain_events:
    orm: true
    odm: false
    bus: domain_event.bus
    transport: async_domain_events
    configure_routing: true  # Auto-configures messenger routing for DomainEventInterfaces to route to the configured transport

framework:
    messenger:
        transports:
            async_domain_events: "%env(ASYNC_MESSENGER_TRANSPORT_DSN)%"
```

The bundle will also configure these messenger settings based on your `domain_events` config. If you already have buses configured, you will need to specify a `framework.messenger.default_bus`.

```
# The bundle also configures your
framework:
    messenger:
        # Set up a bus that will allows no handlers
        buses:
            :
                default_middleware: allow_no_handlers

        # Route all domain events to the domain event transport if configure_routing is true (default)
        routing:
            'AndyThorne\Components\DomainEventsBundle\Events\DomainEventInterface':
```

Message Bus
-----------

[](#message-bus)

Domain Events uses the app's MessageBus to transport domain events. The default Messenger Component is configured to be synchronous and requires at least one handler to be defined for each Message. For Domain Events to work, we need to configure an asynchronous MessageBus and allow it to have no handlers:

### Why Asynchronous?

[](#why-asynchronous)

Domain Events are dispatched within a doctrine postFlush lifecycle event

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity63

Established project with proven stability

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

Total

4

Last Release

1583d ago

Major Versions

1.x-dev → 2.0.02022-01-11

PHP version history (3 changes)1.0.0PHP ^7.3

1.1.0PHP ^7.4|^8.0

2.0.0PHP ^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/371839d8156007b20605f3cd5ed582e4ba67d94ec4b3e5226d02a907300410c5?d=identicon)[andythorne](/maintainers/andythorne)

---

Top Contributors

[![andythorne](https://avatars.githubusercontent.com/u/1301181?v=4)](https://github.com/andythorne "andythorne (8 commits)")

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/andy-thorne-domain-events-bundle/health.svg)

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

###  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)[shopware/platform

The Shopware e-commerce core

3.3k1.5M3](/packages/shopware-platform)[contao/core-bundle

Contao Open Source CMS

1231.6M2.4k](/packages/contao-core-bundle)[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)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

595.2M386](/packages/shopware-core)

PHPackages © 2026

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