PHPackages                             andrzejkupczyk/ddd-building-blocks - 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. [Validation &amp; Sanitization](/categories/validation)
4. /
5. andrzejkupczyk/ddd-building-blocks

ActiveLibrary[Validation &amp; Sanitization](/categories/validation)

andrzejkupczyk/ddd-building-blocks
==================================

Domain-Driven Design components implementation

v3.0.0(5y ago)618.3kMITPHPPHP ^7.4 || ^8.0

Since Sep 24Pushed 5y agoCompare

[ Source](https://github.com/andrzejkupczyk/ddd-building-blocks)[ Packagist](https://packagist.org/packages/andrzejkupczyk/ddd-building-blocks)[ RSS](/packages/andrzejkupczyk-ddd-building-blocks/feed)WikiDiscussions master Synced 4w ago

READMEChangelog (2)Dependencies (5)Versions (9)Used By (0)

Domain-Driven Design components
===============================

[](#domain-driven-design-components)

[![PHP requirement](https://camo.githubusercontent.com/86f9bde8ca4169e9d703b0f8f8477efee4baa0d28e7fc8e185422375e7bf5b6d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f616e64727a656a6b7570637a796b2f6464642d6275696c64696e672d626c6f636b733f6c6f676f3d706870267374796c653d666f722d7468652d6261646765 "PHP requirement")](https://camo.githubusercontent.com/86f9bde8ca4169e9d703b0f8f8477efee4baa0d28e7fc8e185422375e7bf5b6d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f616e64727a656a6b7570637a796b2f6464642d6275696c64696e672d626c6f636b733f6c6f676f3d706870267374796c653d666f722d7468652d6261646765)[![GitHub license](https://camo.githubusercontent.com/473dfc6a86d64af910011ba1dcdc78867fd43cbc9890c342d8ac1d2dac807353/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f616e64727a656a6b7570637a796b2f6464642d6275696c64696e672d626c6f636b733f7374796c653d666f722d7468652d6261646765)](https://github.com/andrzejkupczyk/ddd-building-blocks/blob/main/LICENSE "License")[![GitHub tag (latest SemVer)](https://camo.githubusercontent.com/7cc6b6217e3bb1ee22bf8e921727bf985c8bd3257e6fd2144eae8413005f6883/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f7461672f616e64727a656a6b7570637a796b2f6464642d6275696c64696e672d626c6f636b733f736f72743d73656d766572267374796c653d666f722d7468652d6261646765)](https://camo.githubusercontent.com/7cc6b6217e3bb1ee22bf8e921727bf985c8bd3257e6fd2144eae8413005f6883/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f7461672f616e64727a656a6b7570637a796b2f6464642d6275696c64696e672d626c6f636b733f736f72743d73656d766572267374796c653d666f722d7468652d6261646765)

This repository helps me experiment with the DDD approach.

All implementations are inspired by books, ValueObject library created by [Nicolò Pignatelli](https://github.com/nicolopignatelli), [SeedStack](http://seedstack.org) Java development stack, [ValueObjects toolkit](https://github.com/barryosull/valueobjects)and some other, more direct sources, but mainly by my experiences and needs.

Should I use this library?
--------------------------

[](#should-i-use-this-library)

Although this package can be introduced as a Generic Subdomain to relieve the Core Domain of a project from unnecessary clutter, it has been developed as an example which probably do not reflect 100% your domain. Therefore, you should rather write your own DDD components using interfaces provided by the [DDD Generics](https://github.com/andrzejkupczyk/ddd-generic-subdomain)package to force members of your team or yourself on thinking in terms of immutable objects and their interaction.

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

[](#installation)

Using Composer:

```
composer require andrzejkupczyk/ddd-building-blocks

```

Example usages
--------------

[](#example-usages)

```
