PHPackages                             lej/lej-ddd - 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. lej/lej-ddd

ActiveLibrary

lej/lej-ddd
===========

1.4.0(9y ago)127MITPHPPHP ^7.1

Since Feb 25Pushed 9y agoCompare

[ Source](https://github.com/torstenheinrich/lej-ddd)[ Packagist](https://packagist.org/packages/lej/lej-ddd)[ RSS](/packages/lej-lej-ddd/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependencies (6)Versions (6)Used By (0)

lej-ddd
=======

[](#lej-ddd)

This is just a collection of classes and interfaces useful within a domain-driven-design context in PHP. Have fun!

Domain event
------------

[](#domain-event)

An interface every domain event should implement. Exposes a date on which the domain event occurred.

Domain event publisher
----------------------

[](#domain-event-publisher)

A simple domain event publisher, implementing the singleton pattern to avoid injecting into every single domain object.

Domain event subscriber
-----------------------

[](#domain-event-subscriber)

An interface every domain event subscriber should implement. Subscribing to DomainEvent::class acts a wildcard, all events published are passed to the subscriber.

Entity
------

[](#entity)

An interface every entity should implement. Exposes an equals() method that can be used to test whether two entities has the same identity.

Id
--

[](#id)

An interface every identity should implement.

Value object
------------

[](#value-object)

An interface every value object should implement. Exposes an equals() method that can be used to test whether two value objects represent the same set of data.

Scaffolding
-----------

[](#scaffolding)

To support rapid development, a few CLI commands are available to create the most common domain objects.

- bin/console lej-ddd:create-domain-event &lt;domain&gt; &lt;context&gt; &lt;name&gt;
- bin/console lej-ddd:create-entity &lt;domain&gt; &lt;context&gt; &lt;name&gt;
- bin/console lej-ddd:create-string-id &lt;domain&gt; &lt;context&gt; &lt;name&gt;
- bin/console lej-ddd:create-uuid-id &lt;domain&gt; &lt;context&gt; &lt;name&gt;
- bin/console lej-ddd:create-value-object &lt;domain&gt; &lt;context&gt; &lt;name&gt;

[![Build Status](https://camo.githubusercontent.com/3bac6cf7f5d3430652f9ac15fd99199026b5d7a87e2e094f224168c006778050/68747470733a2f2f7472617669732d63692e6f72672f746f727374656e6865696e726963682f6c656a2d6464642e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/torstenheinrich/lej-ddd)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/7adb4be3c930b309ab7c3fe28cca775f21655b77d11f5649c9ff17adc6ea2f6f/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f746f727374656e6865696e726963682f6c656a2d6464642f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/torstenheinrich/lej-ddd/?branch=master)[![Code Coverage](https://camo.githubusercontent.com/35642bb8307bec6401f94da8f85eea56e022fbf940d93c6aa5812ca2fadaa30f/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f746f727374656e6865696e726963682f6c656a2d6464642f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/torstenheinrich/lej-ddd/?branch=master)

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity62

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

Total

5

Last Release

3330d ago

PHP version history (2 changes)1.0.0PHP ^7.0

1.4.0PHP ^7.1

### Community

Maintainers

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

---

Top Contributors

[![torstenheinrich](https://avatars.githubusercontent.com/u/875256?v=4)](https://github.com/torstenheinrich "torstenheinrich (9 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/lej-lej-ddd/health.svg)

```
[![Health](https://phpackages.com/badges/lej-lej-ddd/health.svg)](https://phpackages.com/packages/lej-lej-ddd)
```

###  Alternatives

[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9682.1M97](/packages/roots-acorn)[temporal/sdk

Temporal SDK

4002.2M18](/packages/temporal-sdk)[vonage/jwt

A standalone package for creating JWTs for Vonage APIs

424.1M4](/packages/vonage-jwt)

PHPackages © 2026

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