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

ActiveSymfony-bundle[Utility &amp; Helpers](/categories/utility)

cnd/ddd-maker-bundle
====================

A Symfony MakerBundle extension to generate DDD, Command and Query from an entity

v1.0.2(1y ago)031CC-BY-NC-SA-4.0PHPPHP ^8.0

Since Mar 8Pushed 1y ago1 watchersCompare

[ Source](https://github.com/coundia/ddd-maker-bundle)[ Packagist](https://packagist.org/packages/cnd/ddd-maker-bundle)[ RSS](/packages/cnd-ddd-maker-bundle/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (4)Versions (4)Used By (0)

DDD/CQRS Maker Bundle
=====================

[](#dddcqrs-maker-bundle)

A Symfony bundle that automates the generation of Domain-Driven Design (DDD) code artifacts, including commands, queries, handlers, controllers, API documentation, tests, and more. This bundle provides console commands to quickly scaffold DDD classes for your Symfony projects, following the CQRS (Command Query Responsibility Segregation) pattern.

Features
--------

[](#features)

- Generate **Commands** and **Handlers** from a given entity.
- Generate **Queries** and **Handlers** from a given entity.
- Generate **Repositories**, **Factories**, **Mappers**, **Value Objects**, and **Aggregates**.
- Support for **Symfony Messenger** to handle DDD commands and queries.
- Use skeleton templates to customize generated code.
- Easily integrate with any Symfony project.

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

[](#installation)

### 1. Require the Bundle

[](#1-require-the-bundle)

If you're developing locally, add a path repository in your project's `composer.json`:

```
{
    "repositories": [
        {
            "type": "path",
            "url": "../ddd-maker-bundle"
        }
    ],
    "require": {
        "cnd/ddd-maker-bundle": "*"
    }
}
```

Then run:

```
composer require cnd/ddd-maker-bundle --dev
```

### 2. Enable the Bundle

[](#2-enable-the-bundle)

If you are using Symfony Flex, the bundle is auto-registered. Otherwise, add the following to your `config/bundles.php`:

```
return [
    // ...
    Cnd\DddMakerBundle\DddMakerBundle::class => ['all' => true],
];
```

Usage
-----

[](#usage)

Run the following command to see the available DDD generator commands:

```
php bin/console list make
```

### 1. Generate a Full CQRS Structure

[](#1-generate-a-full-cqrs-structure)

To generate a complete CQRS structure for an entity, use:

```
php bin/console make:ddd-full YourEntity
```

⚠️ **Note:** The entity must exist in `App\Entity\YourEntity` and have constructor and getters / setters.

### 2. Generate a Query

[](#2-generate-a-query)

To generate a query and its handler:

```
php bin/console make:ddd-query YourEntity QueryName Parameter
```

```

### 3. Generate a Command

To generate a command and its handler:

```bash
php bin/console make:ddd-command YourEntity Action

```

### 4. Inspect the Generated Code

[](#4-inspect-the-generated-code)

After running the commands, you can check the generated structure:

EXAMPLE FOR Entity Wallet
=========================

[](#example-for-entity-wallet)

Create files (not overwrite)
----------------------------

[](#create-files-not-overwrite)

```
php bin/console make:ddd-full Wallet --force false

```

Create files for Command
------------------------

[](#create-files-for-command)

```
php bin/console make:ddd-command Wallet UpdatePhone

```

1. created: src/Core/Application/Command/UpdatePhoneWalletCommand.php
2. created: src/Core/Application/CommandHandler/UpdatePhoneWalletCommandHandler.php
3. created: src/Core/Presentation/Controller/UpdatePhoneWalletController.php
4. created: tests/Functional/Wallet/UpdatePhoneWalletCommandControllerTest.php

- Custom it

Create files for Query
----------------------

[](#create-files-for-query)

```
php bin/console make:ddd-query Wallet find phoneNumber

```

1. created: src/Core/Application/Query/FindByPhoneNumberWalletQuery.php
2. created: src/Core/Application/QueryHandler/FindByPhoneNumberWalletQueryHandler.php
3. created: src/Core/Presentation/Controller/FindByPhoneNumberWalletController.php
4. created: tests/Functional/Wallet/FindByPhoneNumberWalletQueryControllerTest.php

- Custom it

Api doc
=======

[](#api-doc)

### Run tests

[](#run-tests)

```
php bin/phpunit

```

remark (Requis)
---------------

[](#remark-requis)

1. Only field in constructor is checked ,
2. Add all setters and getters

For more
========

[](#for-more)

[docs/usage.md](docs/usage.md)

starter
=======

[](#starter)

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance45

Moderate activity, may be stable

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity45

Maturing project, gaining track record

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

Total

3

Last Release

431d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/75467020b382752e91918d3e0e2a188246808af65678f1ca7b1dc6a73d9ff71c?d=identicon)[pcoundia](/maintainers/pcoundia)

---

Top Contributors

[![coundia](https://avatars.githubusercontent.com/u/1387586?v=4)](https://github.com/coundia "coundia (12 commits)")

---

Tags

bundlecoundiadddmakersymfony

### Embed Badge

![Health badge](/badges/cnd-ddd-maker-bundle/health.svg)

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

###  Alternatives

[winzou/state-machine-bundle

Bundle for the very lightweight yet powerful PHP state machine

34010.4M15](/packages/winzou-state-machine-bundle)[pocketmine/pocketmine-mp

A server software for Minecraft: Bedrock Edition written in PHP

3.5k74.6k86](/packages/pocketmine-pocketmine-mp)[stfalcon/tinymce-bundle

This Bundle integrates TinyMCE WYSIWYG editor into a Symfony2 project.

2692.9M24](/packages/stfalcon-tinymce-bundle)[chrisguitarguy/request-id-bundle

Add request IDs to to your Symfony requests.

451.4M5](/packages/chrisguitarguy-request-id-bundle)[netgen/layouts-core

Netgen Layouts enables you to build and manage complex web pages in a simpler way and with less coding. This is the core of Netgen Layouts, its heart and soul.

3689.4k10](/packages/netgen-layouts-core)[symfony/ai-bundle

Integration bundle for Symfony AI components

30282.3k6](/packages/symfony-ai-bundle)

PHPackages © 2026

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