承接 becklyn/ddd-doctrine-bridge 相关项目开发

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

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

becklyn/ddd-doctrine-bridge

最新稳定版本:3.0.2

Composer 安装命令:

composer require becklyn/ddd-doctrine-bridge

包简介

Doctrine implementation of event store and transaction manager for use with becklyn/ddd-core

README 文档

README

becklyn/ddd-doctrine-bridge provides Doctrine ORM implementations for the event store and transaction manager interfaces found in becklyn/ddd-core. The library is independent from any technology platform other than Doctrine, but we also provide the becklyn/ddd-symfony-bridge library for use within a Symfony application.

How To

See becklyn/ddd-core documentation for how to use the components provided by the libraries.

Setting Up the Event Store

Without using the becklyn/ddd-symfony-bridge library you will have to integrate the event store with your application yourself. Aside from the event store implementation, this library provides Doctrine ORM mappings for it in both XML and annotation formats, as well as a Doctrine Migrations 3 migration to set up the database tables.

Microseconds in Event Timestamps

To have Doctrine ORM 2 persist microseconds in the database as part of the timestamp representing when an event has been raised, you need to register the DateTimeImmutableMicrosecondsType class with Doctrine DBAL as an override for the datetime_immutable type. It should ideally be done during bootstrapping, for example:

use Doctrine\DBAL\Types\Type;
Type::overrideType('datetime_immutable', 'Becklyn\Ddd\DateTime\Infrastructure\Doctrine\DateTimeImmutableMicrosecondsType'); 

Only MySQL and Oracle are currently supported. For MySQL, this should no longer be necessary with Doctrine ORM 3 as it should incorporate this feature natively. For Oracle, activating the \Becklyn\Ddd\DateTime\Infrastructure\Doctrine\MicrosecondsOracleSessionInit Doctrine listener is required as well.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-07-22