siestacat/ddd-manager 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

siestacat/ddd-manager

最新稳定版本:v1.0.9

Composer 安装命令:

composer require siestacat/ddd-manager

包简介

Ddd manager

README 文档

README

This is a personal and experimental project. Use with caution.

Definition

BoundedContext

Folder that have .dddcontext file

BoundedContext must be in %project_dir%/src/BoundedContexts

For example:

  • src/BoundedContexts/Auth/User/.dddcontext
  • src/BoundedContexts/Auth/UserHistory/.dddcontext
  • src/BoundedContexts/Post/.dddcontext

Doctrine ORM Structure Example

Mapping

src/BoundedContexts/Auth/User/Infrastructure/Framework/Doctrine/Orm/Mapping/User/User.orm.xml

User.php entity must exists in src/BoundedContexts/Auth/User/Domain/Entity

Migrations

Executing php bin/console doctrine:migrations:diff:ddd all migrations related to the bounded contexts entities will be generated on:

src/BoundedContexts/Auth/User/Infrastructure/Framework/Doctrine/Orm/Migrations

Types (Value objects)

src/BoundedContexts/Auth/User/Infrastructure/Framework/Doctrine/Orm/Type/types.yaml

Yaml file example:

user_is_active: App\BoundedContexts\Auth\User\Infrastructure\Framework\Doctrine\Orm\Type\UserIsActiveType

Symfony Structure Example

Bundles

src/BoundedContexts/Auth/User/Infrastructure/Framework/Symfony/config/bundles.php

Services and packages

src/BoundedContexts/Auth/User/Infrastructure/Framework/Symfony/config/services.yaml src/BoundedContexts/Auth/User/Infrastructure/Framework/Symfony/config/services.php src/BoundedContexts/Auth/User/Infrastructure/Framework/Symfony/config/services_dev.yaml src/BoundedContexts/Auth/User/Infrastructure/Framework/Symfony/config/services_prod.yaml src/BoundedContexts/Auth/User/Infrastructure/Framework/Symfony/config/services_dev.php src/BoundedContexts/Auth/User/Infrastructure/Framework/Symfony/config/services_prod.php src/BoundedContexts/Auth/User/Infrastructure/Framework/Symfony/config/services/my_services.yaml src/BoundedContexts/Auth/User/Infrastructure/Framework/Symfony/config/services/my_services.php src/BoundedContexts/Auth/User/Infrastructure/Framework/Symfony/config/services/packages/package_name.yaml src/BoundedContexts/Auth/User/Infrastructure/Framework/Symfony/config/services/packages/package_name.php src/BoundedContexts/Auth/User/Infrastructure/Framework/Symfony/config/services/packages/dev/package_name.yaml src/BoundedContexts/Auth/User/Infrastructure/Framework/Symfony/config/services/packages/dev/package_name.php src/BoundedContexts/Auth/User/Infrastructure/Framework/Symfony/config/services/packages/prod/package_name.yaml src/BoundedContexts/Auth/User/Infrastructure/Framework/Symfony/config/services/packages/prod/package_name.php

Twig templates

Templates can be imported with @ as a prefix with snake case separated by dot of bounded context name, for example: @auth.user/file.html.twig

src/BoundedContexts/Auth/User/Infrastructure/Framework/Symfony/templates

Translations

Only 1 messages translation domain can exists across all bounded contexts

src/BoundedContexts/Auth/User/Infrastructure/Framework/Symfony/translations/messages.yaml

If the domain is not message, must be snake case separated by dot of bounded context name, see command debug:ddd:bounded-contexts

src/BoundedContexts/Auth/User/Infrastructure/Framework/Symfony/translations/auth.user.yaml

Allowed files extensions, otherwise the file will be ignored

  • php
  • yml
  • yaml
  • xlf
  • xliff
  • po
  • mo
  • ts
  • csv
  • res
  • dat
  • ini
  • json

Usage

composer require siestacat/ddd-manager

Copy files from recipes to project dir

Docker Usage

Build the image

docker build -t ddd-manager .

Run PHPUnit tests

docker run --rm -it ddd-manager ./vendor/bin/phpunit

统计信息

  • 总下载量: 35
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: Apache-2.0
  • 更新时间: 2025-10-30

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固