Un bundle Symfony qui aide à générer une structure de dossiers pour une architecture DDD (Domain Driven Design).
composer require thedevopser/symfony-context-bundle
La commande suivante permet de générer un nouveau contexte :
php bin/console thedevopser:generate:context MonContexte
Cette commande va créer la structure de dossiers suivante :
MonContexte/
├── Domain/
│ ├── Entity/
│ └── Interfaces/
├── Application/
│ ├── Command/
│ ├── Query/
│ ├── Event/
│ └── Service/
├── Infrastructure/
│ ├── Doctrine/
│ └── Persistence/
├── Presenter/
│ ├── Controller/
│ ├── Form/
│ └── Voter/
└── README.md
Domain/
: Le cœur métierEntity/
: Les entités et value objectsInterfaces/
: Les interfaces des repositories
Application/
: La couche applicationCommand/
: Les commandes et leurs handlersQuery/
: Les requêtes et leurs handlersEvent/
: Les gestionnaires d'événementsService/
: Les services applicatifs
Infrastructure/
: La couche infrastructureDoctrine/
: L'implémentation des repositoriesPersistence/
: Configuration de la persistance
Presenter/
: La couche présentationController/
: Les contrôleursForm/
: Les types de formulairesVoter/
: Les voters
A Symfony bundle that helps generate a folder structure for DDD (Domain Driven Design) architecture.
composer require thedevopser/symfony-context-bundle
The following command generates a new context:
php bin/console thedevopser:generate:context MyContext
This command will create the following folder structure:
MyContext/
├── Domain/
│ ├── Entity/
│ └── Interfaces/
├── Application/
│ ├── Command/
│ ├── Query/
│ ├── Event/
│ └── Service/
├── Infrastructure/
│ ├── Doctrine/
│ └── Persistence/
├── Presenter/
│ ├── Controller/
│ ├── Form/
│ └── Voter/
└── README.md
Domain/
: The business coreEntity/
: Entities and value objectsInterfaces/
: Repository interfaces
Application/
: The application layerCommand/
: Commands and their handlersQuery/
: Queries and their handlersEvent/
: Event handlersService/
: Application services
Infrastructure/
: The infrastructure layerDoctrine/
: Repository implementationsPersistence/
: Persistence configuration
Presenter/
: The presentation layerController/
: ControllersForm/
: Form typesVoter/
: Voters
vendor/bin/phpunit
Pull requests are welcome! | Les Pull Requests sont les bienvenues !
MIT