martyn82 / apha
PHP 的 Apha CQRS/ES 库
v0.1.0
2016-04-04 06:58 UTC
Requires
- php: >=7.0
- doctrine/annotations: ~1.2
- doctrine/cache: ~1.6
- jms/serializer: ~1.1
- monolog/monolog: ~1.17
- phpcollection/phpcollection: ~0.4
- ramsey/uuid: ~3.1
Requires (Dev)
- ext-mongodb: ^1.1
- elasticsearch/elasticsearch: ~2.1
- mongodb/mongodb: ~1.0
- phing/phing: ~2.13
- phpunit/phpunit: ~5.1
Suggests
- ext-mongodb: Enabling the MongoDB extension will allow you to use MongoDB as data store.
- elasticsearch/elasticsearch: Installing the ElasticSearch library will allow you to use it as read store.
- mongodb/mongodb: Installing the MongoDB library will allow you to use MongoDB as read and/or write store.
This package is not auto-updated.
Last update: 2024-09-14 17:59:02 UTC
README
APHA 是一个 PHP 的 CQRS/ES 库。它包含了构建应用所需的全部构建块,该应用可实施命令查询责任分离(CQRS),无论是否使用事件源(Event Sourcing)。
APHA 提供
- 使用注解的泛型命令和事件处理
- 使用 MongoDB 作为事件存储和/或读取存储
- 使用 ElasticSearch 作为读取存储
- 事件回放
- 传奇(Sagas)
- 事件调度(实验性)
先决条件
需求
- PHP 7+
- Composer
可选
- MongoDB
- ElasticSearch
安装
$ composer install
使用
运行测试
$ bin/phing test:unit
在自己的项目中使用
$ composer require martyn82/apha:~0.1
文档
目前,尚无 API 文档。即将推出!
示例
一些快速入门示例可在 examples
目录中找到。您可以通过在命令行中执行以下命令来运行它们:
$ php examples/ ...
许可
请参阅项目根目录中名为 LICENSE
的文件。