承接 nepada/message-bus-doctrine 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

nepada/message-bus-doctrine

最新稳定版本:v2.3.3

Composer 安装命令:

composer require nepada/message-bus-doctrine

包简介

Doctrine ORM integration for nepada/message-bus

README 文档

README

Build Status Coverage Status Downloads this Month Latest stable

Installation

Via Composer:

$ composer require nepada/message-bus-doctrine

Usage

Recording domain events inside entities

Make your entities implement Nepada\MessageBusDoctrine\Events\ContainsRecordedEvents (e.g. by using Nepada\MessageBusDoctrine\Events\PrivateEventRecorder trait) and record domain events inside the entities. The events will be automatically collected and dispatched on flush.

Transaction handling

TransactionMiddleware wraps the command handling into a database transaction. All changes made by lower layers are automatically flushed and commited, or rolled back on error.

It is highly recommended to use PreventOuterTransactionMiddleware to ensure there is no outer database transaction started outside of the message bus stack. Not doing so might lead to unwanted behavior such as dispatching and processing events before the changes made in command handler were actually persisted.

Clearing entity manager

Use ClearEntityManagerMiddleware to clear entity manager before and/or after the message is handled. Note: Entity manager will not be cleared when inside active transaction, i.e. the middleware order is important.

Credits

Event recording idea and parts of its implementation are based on simple-bus/doctrine-orm-bridge by Matthias Noback, Cliff Odijk, Ruud Kamphuis.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: BSD-3-Clause
  • 更新时间: 未知

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固