PHPackages                             flow2lab/eventsourcing - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. flow2lab/eventsourcing

ActiveTypo3-flow-package

flow2lab/eventsourcing
======================

A package for using EventSourcing

00[4 issues](https://github.com/Flow2Lab/EventSourcing/issues)PHP

Since Apr 4Pushed 10y ago3 watchersCompare

[ Source](https://github.com/Flow2Lab/EventSourcing)[ Packagist](https://packagist.org/packages/flow2lab/eventsourcing)[ RSS](/packages/flow2lab-eventsourcing/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Flow2Lab.EventSourcing [![Build Status](https://camo.githubusercontent.com/d98348d1e806244424c2b04672b18eadccc4ff87250bdfd9d2b4f15c74a6e59d/68747470733a2f2f7472617669732d63692e6f72672f466c6f77324c61622f4576656e74536f757263696e672e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/Flow2Lab/EventSourcing)
========================================================================================================================================================================================================================================================================================================================

[](#flow2labeventsourcing-)

[![Code Climate](https://camo.githubusercontent.com/771b1e586d64abeff4891d4beccb1e4f4e963b32f2f108195b2ffa01b087dfc7/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f466c6f77324c61622f4576656e74536f757263696e672f6261646765732f6770612e737667)](https://codeclimate.com/github/Flow2Lab/EventSourcing) [![Test Coverage](https://camo.githubusercontent.com/697cc7cfc88b5e2ce72ae619da59386ecd398c544bd06f957879d786336ed646/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f466c6f77324c61622f4576656e74536f757263696e672f6261646765732f636f7665726167652e737667)](https://codeclimate.com/github/Flow2Lab/EventSourcing/coverage) [![Issue Count](https://camo.githubusercontent.com/d978ed44c792b670f0988f541e6e867385cbc863bc456cd73ad9db0e524fe8c0/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f466c6f77324c61622f4576656e74536f757263696e672f6261646765732f69737375655f636f756e742e737667)](https://codeclimate.com/github/Flow2Lab/EventSourcing)[![Latest Stable Version](https://camo.githubusercontent.com/6a21644ffdd5d8f26d6f50e5363871f963ed1a34475406cfd3c761d65d079a0d/68747470733a2f2f706f7365722e707567782e6f72672f666c6f77326c61622f6576656e74736f757263696e672f762f737461626c65)](https://packagist.org/packages/flow2lab/eventsourcing) [![Total Downloads](https://camo.githubusercontent.com/d0c5d0f2c19fc0bc908d8276b4ba6fce00913c75f36432cec0b875e21a604c68/68747470733a2f2f706f7365722e707567782e6f72672f666c6f77326c61622f6576656e74736f757263696e672f646f776e6c6f616473)](https://packagist.org/packages/flow2lab/eventsourcing) [![Latest Unstable Version](https://camo.githubusercontent.com/cb5e9faac4b5c657c9553025ae857920716e2487bcd99ccb2196bb0c9ec2bf54/68747470733a2f2f706f7365722e707567782e6f72672f666c6f77326c61622f6576656e74736f757263696e672f762f756e737461626c65)](https://packagist.org/packages/flow2lab/eventsourcing) [![License](https://camo.githubusercontent.com/7f3edb9c8f2cfdc1ba101e12aa4551084d91448654bac22777e0e0f158e9ffa6/68747470733a2f2f706f7365722e707567782e6f72672f666c6f77326c61622f6576656e74736f757263696e672f6c6963656e7365)](https://packagist.org/packages/flow2lab/eventsourcing)

This package provides basic CQRS/ES infrastructure for [TYPO3 Flow](http://flow.typo3.org).

Its purpose is to provide inspiration for writing your own customized set of tools for working with CQRS/ES. *I do not recommend using this package without understanding the underlaying concepts first.*

Installation
------------

[](#installation)

```
$ composer require flow2lab/eventsourcing dev-master

```

Commands
--------------------------------------------

[](#commands)

Commands define the interface to your domain model. They enter the *[command bus](#command_bus)* and will then be handled (sync/async) by *[command handlers](#command_handlers)*. Commands do never return any data, thus the interface for handling commands is of type `void`.

### Defining commands

[](#defining-commands)

You can define a command by extending from `Flow2Lab\EventSourcing\Command\Command` (I will soonish update the code base to use the `CommandInterface` instead, but until then you need to inherit from `Command`). The command has a `commandId` that can be used for logging purposes, if so desired.

```
