承接 phauthentic/event-store 相关项目开发

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

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

phauthentic/event-store

最新稳定版本:1.0.0-rc1

Composer 安装命令:

composer require phauthentic/event-store

包简介

README 文档

README

This is an event store abstraction for the Phauthentic Event Sourcing Library. It provides a simple interface for storing and retrieving domain events by aggregate, with pluggable backends for different storage engines.

Requirements

  • PHP 8.2 or higher

Installation

composer require phauthentic/event-store

Features

  • EventStoreInterface – Contract for storing and replaying events by aggregate
  • PDO Event Store – SQL-backed store (MySQL, MariaDB, PostgreSQL, SQLite, MS SQL Server)
  • In-Memory Event Store – For testing, prototyping, and demos
  • EventFactory – Create events from arrays and convert events to arrays
  • Serialization – Pluggable serializers for payload and metadata

Quick Start

use Phauthentic\EventStore\Event;
use Phauthentic\EventStore\InMemoryEventStore;
use Phauthentic\EventStore\ReplyFromPositionQuery;

$eventStore = new InMemoryEventStore();

$event = new Event(
    aggregateId: 'order-123',
    aggregateVersion: 1,
    event: 'OrderCreated',
    payload: ['amount' => 99.99],
    createdAt: new \DateTimeImmutable()
);

$eventStore->storeEvent($event);

foreach ($eventStore->replyFromPosition(new ReplyFromPositionQuery('order-123', 1)) as $storedEvent) {
    // Process event...
}

Documentation

Please start by reading documentation in this repository.

License

Copyright Florian Krämer

Licensed under the MIT license.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-04-23

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固