Releases: event-engine/php-engine
Releases · event-engine/php-engine
0.11.0 Dev Relase
Changed
- bumped php-persistence to v0.5, due to changes in php-document-store
0.10.2 Bugfix Release
Fixed
- #23 (@arnedesmedt ): Response type needs to implement
JsonSchemaAwareRecord
0.10.1 Bugfix Release
0.10.0 Dev Release
Added
- #19 (@sandrokeil ): Add support for registering a preprocessor via aggregate description
0.9.0 Dev Release
Added
- #18 Add Event Engine method to load aggregate events
- It's a wrapper around the event store method
loadAggregateEvents
that derives stream name from aggregate description. It also turns eachGenericEvent
into anAggregateEventEnvelope
for easy access to event metadata and the custom event instance, if configuredFlavour
returns one. See tests for details.
- It's a wrapper around the event store method
0.8.1 Bugfix Release
Fixed
- #17 (@shochdoerfer ): Uniqueness of message name is checked across all three message types now
0.8.0 Dev Release
Added
- #16 Allow multiple contexts to be injected in an aggregate function
Fixed
- #14 - Force replay when rebuilding aggregate state
- #15 - Always pass context as argument even in case it is
null
BC Break
The Bugfix #15 and the new Feature #16 can cause a BC Break if you use a ContextProvider
that returns null
or has a void
return type. Prior to this release a null
context was ignored by Event Engine. If you inject one or more services in the same aggregate function, the services would directly be injected after the command. This is fixed now. Hence, the aggregate function receives a null
after the command followed by services.
We consider this change a bugfix, because null
is a valid context and should not be ignored by Event Engine.
Let's use an example to make it clear:
Release < 0.8
$eventEngine->process(Command::DO_SOMETHING)
->withNew(Aggregate::SOMETHING)
->provideContext(NullContextProvider::class)
->provideService(SomeService::class)
// Using a closure as aggregate function for easier understanding
// SomeService is directly injected after the command
->handle(function (Message $doSomething, SomeService $someService) {
})
Release >= 0.8
$eventEngine->process(Command::DO_SOMETHING)
->withNew(Aggregate::SOMETHING)
->provideContext(NullContextProvider::class)
->provideService(SomeService::class)
// Null is injected (result of the context provider call) followed by the service
->handle(function (Message $doSomething, $nullableContext, SomeService $someService) {
})
0.7.0 Dev Release
Added
- #10 Add option to forward metadata
- Call
EventEngine::enableMetadataForwarding()
during set up phase of the Event Engine to enable the new feature. Once enabled you can pass an array of metadata toEventEngine::dispatch()
and Event Engine will add the metadata to all messages caused by the dispatch call. This includes recorded events, follow up commands, events caused by follow up commands, etc. Even when dispatching custom messages you can pass metadata as an array:$eventEngine->dispatch($myCustomCmd, [], ['metadata' => 'goes here']);
Please note: when using prooph v7 event-store your metadata array should only contain keys with scalar values!
- Call
0.6.0 Dev Release
Changed
- Bump php-persistence version to v0.4, contains BC Break, see https://github.com/event-engine/php-persistence/releases/tag/v0.4.0
0.5.2 Bugfix Release
Fixed
- #9 allow max version to be null (@arnedesmedt )