open-solid/core
最新稳定版本:v0.3.1
Composer 安装命令:
composer require open-solid/core
包简介
Building Blocks for Modular Architecture with Symfony
README 文档
README
Building blocks for modular architecture with Symfony.
Provides DDD-oriented abstractions ─ commands, queries, domain events, error handling, collections, and a convention-based module system ─ so you can focus on your domain logic instead of wiring infrastructure.
Installation
composer require open-solid/core
The bundle is auto-registered via Symfony Flex.
Modular Application Structure
Each bounded context lives in its own module with the same layered structure:
src/ ├── Product/ # Module root │ ├── Application/ │ │ └── Product/ # Aggregate │ │ ├── Create/ # Use case (verb) │ │ │ ├── CreateProduct.php # Command │ │ │ └── CreateProductHandler.php # Handler │ │ └── Find/ │ │ ├── FindProduct.php # Query │ │ └── FindProductHandler.php # Handler │ ├── Domain/ │ │ ├── Error/ # Domain-specific errors │ │ ├── Event/ # Domain events │ │ └── Model/ # Aggregate, entities and value objects │ │ └── Product.php │ └── Infrastructure/ │ ├── Resources/ │ │ └── config/ │ │ ├── doctrine/ │ │ │ └── mapping/ # Doctrine ORM mappings │ │ ├── packages/ # Package-specific config overrides │ │ └── services.yaml # Service definitions │ └── ProductExtension.php # Module extension │ ├── Order/ # Another module │ ├── Application/ │ ├── Domain/ │ └── Infrastructure/ │ └── OrderExtension.php │ └── Kernel.php
Each ModuleExtension automatically registers services, and Doctrine mappings for its module ─ zero manual wiring.
Documentation
- Configuration ─ Bus strategies, Doctrine ORM mapping, and API Platform resource settings.
- Commands & Queries (CQS) ─ Type-safe command-query separation with auto-discovered handlers.
- Domain Events ─ Raise and react to events with automatic publishing after command execution.
- Error Handling ─ Structured domain errors with factory methods and batch error accumulation.
- Collections ─ Domain repository abstractions built on top of Doctrine Collections.
- Modular Architecture ─ Convention-based module system with automatic service registration.
统计信息
- 总下载量: 5.62k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 2
- 依赖项目数: 3
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-12-22