PHPackages                             biberlabs/ddd-embeddables - 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. [Database &amp; ORM](/categories/database)
4. /
5. biberlabs/ddd-embeddables

ActiveLibrary[Database &amp; ORM](/categories/database)

biberlabs/ddd-embeddables
=========================

A collection of re-usable value objects ready to use as Embeddable in Doctrine entities

v0.2.0(3y ago)6525210[3 issues](https://github.com/biberlabs/ddd-embeddables/issues)MITPHPPHP ^8.0CI failing

Since Oct 11Pushed 3y ago7 watchersCompare

[ Source](https://github.com/biberlabs/ddd-embeddables)[ Packagist](https://packagist.org/packages/biberlabs/ddd-embeddables)[ RSS](/packages/biberlabs-ddd-embeddables/feed)WikiDiscussions develop Synced today

READMEChangelog (2)Dependencies (3)Versions (4)Used By (0)

DDD Embeddables
===============

[](#ddd-embeddables)

---

[![Build Status](https://camo.githubusercontent.com/3bd942e76504646c2742293eba66d3ad621e444f6edd86ee277441173a5742a6/68747470733a2f2f7365637572652e7472617669732d63692e6f72672f62696265726c6162732f6464642d656d6265646461626c65732e7376673f6272616e63683d6d6173746572)](https://secure.travis-ci.org/biberlabs/ddd-embeddables)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/4011cd6f4c4fc8ec402bc8371e0ac4798e0174d6b773fff3c8d21cb467f9c315/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f62696265726c6162732f6464642d656d6265646461626c65732f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/biberlabs/ddd-embeddables/?branch=master)[![Code Coverage](https://camo.githubusercontent.com/6a9b12f89aac79b673e477d0819763f72d2025a1073741a4d02ee339e386c225/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f62696265726c6162732f6464642d656d6265646461626c65732f6261646765732f636f7665726167652e706e673f623d6d61737465722672616e643d313233)](https://scrutinizer-ci.com/g/biberlabs/ddd-embeddables/?branch=master)

A collection of reusable value objects written in PHP and targeting versions 8.0 and above. Value objects are essential building blocks of **Domain Driven Design** approach and described by Martin Fowler in *P of EAA page 486* as below:

> "Value object is a small simple object, like money or a date range, whose equality isn't based on identity."

> – Martin Fowler

All classes in this library annotated as `ORM\Embeddable` with appropriately adjusted column attributes. This makes them ready to use in any project with Doctrine ORM as [Embeddables](http://doctrine-orm.readthedocs.io/projects/doctrine-orm/en/latest/tutorials/embeddables.html).

Installation &amp; Usage
------------------------

[](#installation--usage)

Install the library using [composer](https://getcomposer.org).

```
$ composer require biberlabs/ddd-embeddables
```

and use it in your entities:

```
