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)131CC-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 today

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 52% of packages

Maintenance42

Moderate activity, may be stable

Popularity9

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

477d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/107758045?v=4)[pcoundia](/maintainers/pcoundia)[@pcoundia](https://github.com/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

[shopware/platform

The Shopware e-commerce core

3.4k1.5M3](/packages/shopware-platform)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

585.6M574](/packages/shopware-core)[pocketmine/pocketmine-mp

A server software for Minecraft: Bedrock Edition written in PHP

3.5k78.3k90](/packages/pocketmine-pocketmine-mp)[rcsofttech/audit-trail-bundle

Enterprise-grade, high-performance Symfony audit trail bundle. Automatically track Doctrine entity changes with split-phase architecture, multiple transports (HTTP, Queue, Doctrine), and sensitive data masking.

1189.8k](/packages/rcsofttech-audit-trail-bundle)

PHPackages © 2026

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