Download the PHP package cnd/ddd-maker-bundle without Composer
On this page you can find all versions of the php package cnd/ddd-maker-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download cnd/ddd-maker-bundle
More information about cnd/ddd-maker-bundle
Files in cnd/ddd-maker-bundle
Package ddd-maker-bundle
Short Description A Symfony MakerBundle extension to generate DDD, Command and Query from an entity
License CC-BY-NC-SA-4.0
Informations about the package ddd-maker-bundle
DDD/CQRS 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
- 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
1. Require the Bundle
If you're developing locally, add a path repository in your project's composer.json
:
Then run:
2. Enable the Bundle
If you are using Symfony Flex, the bundle is auto-registered. Otherwise, add the following to your config/bundles.php
:
Usage
Run the following command to see the available DDD generator commands:
1. Generate a Full CQRS Structure
To generate a complete CQRS structure for an entity, use:
⚠️ Note: The entity must exist in App\Entity\YourEntity
and have constructor and getters / setters.
2. Generate a Query
To generate a query and its handler:
bash php bin/console make:ddd-command YourEntity Action
php bin/console make:ddd-full Wallet --force false
php bin/console make:ddd-command Wallet UpdatePhone
php bin/console make:ddd-query Wallet find phoneNumber
php bin/phpunit
## remark (Requis)
1. Only field in constructor is checked ,
2. Add all setters and getters
# For more
[docs/usage.md](docs/usage.md)
# starter
https://github.com/coundia/ddd-maker-bundler-starter
All versions of ddd-maker-bundle with dependencies
symfony/framework-bundle Version ^5.4 || ^6.0 || ^7.2
symfony/maker-bundle Version ^1.41
ramsey/uuid Version ^4.7