PHPackages                             cohete/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. [Utility &amp; Helpers](/categories/utility)
4. /
5. cohete/ddd

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

cohete/ddd
==========

Opinionated DDD building blocks for Cohete

v0.1.0(3mo ago)01MITPHPPHP &gt;=8.2CI passing

Since Mar 12Pushed 3mo agoCompare

[ Source](https://github.com/pascualmg/cohete-ddd)[ Packagist](https://packagist.org/packages/cohete/ddd)[ RSS](/packages/cohete-ddd/feed)WikiDiscussions main Synced 3w ago

READMEChangelogDependencies (3)Versions (7)Used By (0)

cohete/ddd
==========

[](#coheteddd)

[![CI](https://github.com/pascualmg/cohete-ddd/actions/workflows/ci.yml/badge.svg)](https://github.com/pascualmg/cohete-ddd/actions/workflows/ci.yml)

Opinionated DDD building blocks for [Cohete](https://github.com/pascualmg/cohete-framework).

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

[](#installation)

```
composer require cohete/ddd
```

Value Objects
-------------

[](#value-objects)

- **StringValueObject** - Base class for string VOs with validation (maxLength, notNull, notEmpty)
- **UuidValueObject** - UUID v4 via ramsey/uuid
- **AtomDateValueObject** - Dates in ATOM format

### Example: custom Value Object

[](#example-custom-value-object)

```
use Cohete\DDD\ValueObject\StringValueObject;

class UserEmail extends StringValueObject
{
    public static function from(?string $value = null): static
    {
        static::assertNotNull($value);
        static::assertNotEmpty($value);
        static::assertMaxLength(255, $value);

        if (!filter_var($value, FILTER_VALIDATE_EMAIL)) {
            throw new \InvalidArgumentException("Invalid email: $value");
        }

        return parent::from($value);
    }
}
```

License
-------

[](#license)

MIT

###  Health Score

34

—

LowBetter than 75% of packages

Maintenance81

Actively maintained with recent releases

Popularity1

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 66.7% 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

Unknown

Total

1

Last Release

103d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/11436672?v=4)[Pascual Muñoz ](/maintainers/pascualmg)[@pascualmg](https://github.com/pascualmg)

---

Top Contributors

[![pascualmg](https://avatars.githubusercontent.com/u/11436672?v=4)](https://github.com/pascualmg "pascualmg (6 commits)")[![google-labs-jules[bot]](https://avatars.githubusercontent.com/in/842251?v=4)](https://github.com/google-labs-jules[bot] "google-labs-jules[bot] (3 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

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

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

###  Alternatives

[pocketmine/pocketmine-mp

A server software for Minecraft: Bedrock Edition written in PHP

3.5k77.4k88](/packages/pocketmine-pocketmine-mp)[firefly-iii/data-importer

Firefly III Data Import Tool.

7965.8k](/packages/firefly-iii-data-importer)[mynaparrot/plugnmeet-sdk

plugNmeet PHP SDK

102.5k](/packages/mynaparrot-plugnmeet-sdk)

PHPackages © 2026

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