Skip to content

prooph/annotations

Repository files navigation

prooph/annotations

Build Status Coverage Status Gitter

This package adds support for annotations to Prooph.

Important

This library will receive support until December 31, 2019 and will then be deprecated.

For further information see the official announcement here: https://www.sasaprolic.com/2018/08/the-future-of-prooph-components.html

Features

  • Build aggregates and event listeners, almost without coupling to internal Prooph logic.
  • Use any POPO (Plain Old PHP Object) as an aggregate.

Note: this package is considered experimental!

Usage

TODO

See the example in example/example.php.

Supported annotations

This package introduces the following annotations:

  • @AggregateIdentifier

    Should be put on a property to indicate where the aggregate identifier can be found.

  • @CommandHandler

  • @EventHandler

  • @TargetAggregateIdentifier

    Should be be put on a property or method in a command (class), to indicate where the identifier of the target aggregate can be found.

POPO aggregates

AggregateLifecycle::recordThat

TODO

Links

This package was partly inspired by Axon Framework 3.0.