Upgrade to 0.6.0

Published at 20 July 2019

Event serialization is made generic for any payload so commands can leverage the same serialization. It’s not called “payload serialization”.

-use EventSauce\EventSourcing\Serialization\EventSerializer;
+use EventSauce\EventSourcing\Serialization\PayloadSerializer;

-use EventSauce\EventSourcing\Serialization\SerializableEvent;
+use EventSauce\EventSourcing\Serialization\SerializablePayload;

-$serializer = new EventSauce\EventSourcing\Serialization\ConstructingEventSerializer();
+$serializer = new EventSauce\EventSourcing\Serialization\ConstructingPayloadSerializer();

Aggregate Root Construction

The AggregateRootBehaviour trait includes a construction, this constructor is now private by default. It’s recommended to use named constructors. For more information, view the aggregate root construction documentation.