phariscope/event-store-doctrine
最新稳定版本:1.1.2
Composer 安装命令:
composer require phariscope/event-store-doctrine
包简介
Store event via Doctrine
README 文档
README
composer require phariscope/event-store
Usage
- First, make sure to have the DATABASE_URL environment variable correctly initialized.
- Second, add the PersistEventSubscriber to the listeners as soon as you want.
Enjoy, and observe an 'events' table that contains all published events.
// Assume env var is intiailized. // Example DATABASE_URL=mysql://root:pwd1234@mariadb:3306/ap-prod?serverVersion=mariadb-10.9.3&charset=utf8mb4 $store = new EventStoreDoctrine(); $subscriber = new PersistDoctrineEventSubscriber($store); EventPublisher::instance()->subscribe($subscriber); // use your own EventPublisherFacade could be a good idea
To Contribut to pharsicope/EventStoreDoctrine
Requirements
- docker
- git
Install
- git clone git@github.com:phariscope/EventStoreDoctrine.git
Unit test
bin/phpunit
Using Test-Driven Development (TDD) principles (thanks to Kent Beck and others), following good practices (thanks to Uncle Bob and others) and the great book 'DDD in PHP' by C. Buenosvinos, C. Soronellas, K. Akbary
Quality
- phpcs PSR12
- phpstan level 9
- coverage 100%
- infection MSI 100%
Quick check with:
./codecheck
Check coverage with:
bin/phpunit --coverage-html var
and view 'var/index.html' with your browser
Check infection with:
bin/infection
and view 'var/infection.html' with your browser
统计信息
- 总下载量: 2.59k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-09-29