3.2.1 - 2022-11-18
- Add missing template to AggregateRootBehaviourWithRequiredHistory (#202)
3.2.0 - 2022-10-28
- Allow setting the default payload serialization to use object mapping by setting the
EVENTSAUCE_DEFAULT_SERIALIZERenvironment variable to `“object-mapper”’.
- Allow installing
3.1.0 - 2022-08-28
- AntiCorruptionLayerTestCase was added to easily allow testing of ACLs
- AntiCorruptionMessageConsumer $translator parameter is now optional.
- AntiCorruptionMessageDispatcher $translator parameter is now optional.
3.0.0 - 2022-08-28
- MessageRepository::paginate was added to enable replaying of projections (breaking change)
- Message replaying capabilities added in collaboration with @Robertbaelde 👏
2.3.1 - 2022-08-28
- Allow eventsauce/object-hydrator version 0.5
2.3.0 - 2022-07-18
- Added object-mapper based serialization method (#175)
- Allowed for event consumer strategies (#176)
2.2.1 - 2022-05-28
- Fixed visibility for serialization overrides in aggregate root test case
2.2.0 - 2022-05-28
- Allow serialization overrides in aggregate root test case.
2.1.0 - 2022-04-16
- Customisable event payload assertions (#170) by @Robertbaelde
- Set the aggregate ID in the message consumer testcase (#172) by @Robertbaelde
2.0.0 - 2022-04-03
- Message::payload introduced as a replacement for Message::event.
- Message::event is deprecated.
- SerializablePayload::fromPayload return type is now
- Message::withTimeOfRecording now accepts a format parameter.
- DefaultHeadersDecorator accepts a timeOfRecordingFormat constructor parameter.
- AggregateRootId::fromString return type is now
1.4.1 - 2022-02-25
- [CodeGeneration] Allow symfony/yaml version 6
1.4.0 - 2022-02-17
- [NEW] AntiCorruptionLayer module, containing a consumer, dispatcher, and relay that filter and translate messages.
- for AggregateRootBehaviour: extracted createNewInstance to allow construction overrides.
- CollectingMessageConsumer, useful for testing things that invoke or decorate consumers
- for CollectingMessageDispatcher, added collectedPayloads for convenience during test assertions
- for MessageConsumerThatSerializesMessages, this implementation now serialized from and to JSON for increased test confidence.
- ExplicitlyMappedClassNameInflector: a explicitly mapped class name inflector, allowing specific mapping class names from and to event types
- Added a deprecated Consumer interface for easier upgrade from 0.8
- Added a new header AGGREGATE_ROOT_TYPE, which is added by the default aggregate root repository and exposed via a
getter on the
- [Serialization] Added a MySQL8DateFormatting serialization decorator to support MySQL 8 dates.
- Added missing scalar types for message header values (array/float/bool).
- Loosened the exception checking to be more in line with PHPUnit’s exception comparison.
- Aggregate root version is now correctly incremented per event.
EventSauce\EventSourcing\Consumerinterface was renamed to
- The dependency on
CodeGenerationmodule was extracted into a separate package
- The test utilities were extracted into a separate package
- The clock module was extracted into a separate package
- The serialization and upcasting is no longer generator based and now maps 1:1.
0.8.2 - 2020-11-01
- Support PHP 8
- Added typehints
- Cleaned up shipped artifact
0.8.1 - 2020-04-05
ramsey/uuidversion 3 and 4.
0.8.0 - 2019-12-21
Dispatch events with ease! The default MessageDispatchingEventDispatcher allows you to dispatched events, which dispatches Messages on your regular MessageDispatcher.
- The method
::timeZone(): DateTimeZonewas added to the
TestClock::moveForward(DateInterval $interval): voidwas added:
moveForwardwas introduces to make moving the test clock forward easier. Read how to use the SystemClock and the TestClock.
- Snapshotting 🤩
- Code Generation supports user defined interfaces for generated classes.
- A new
EventConsumerbase-class is provided to simplify event consumption.
- Aggregate version handling is now more accurate (inaccuracies could happen when reducing streams in upcasting).
- Message repositories are now expected to return the aggregate version as the
- Message repositories must now implement the
- Many things have return types now 👍
See the upgrade guide to 0.7.0.
- Event serialization is now converted to payload serialization. Generated commands now use the same serialization for easier tracing and logging.
- Aggregate root behaviour now has a private constructor.
See the upgrade guide to 0.6.0.
Test helpers (the ::withX methods) are now immutable.
BaseAggregateRoot has now been removed and all the traits have
been collapsed into one. This trait has been moved to the root namespace.
- Multiple interactions and intermediate persisting of aggregates now has correct versioning of messages.
- Code generation now handles types and type aliases better.
- symfony/yaml now allows ^3.2|^4.0
AggregateRootRepositoryis now an interface. The default implementation is the
Eventinterface is removed. A new
SerializableEventinterface is provided to aid the default serializers. If you use the default serializers your events must implement this interface. The methods are the same as the
Eventinterface, so effectively it’s an in-place replacement.
CodeDumperis changed to ensure code now implements the
AggregateRootTestCasenow allows you to overwrite the
aggregateRootRepositorymethod for if/when you have a custom implementation and still want all the benefits of the default test tooling.
- The Header::AGGREGATE_ROOT_ID is no longer converted to string in the default decorator but in the serializer.
- The Header::AGGREGATE_ROOT_ID_TYPE is now set in the serializer.
CodeDumpernow generated prettier code.
PointInTimerelated properties of the
Eventinterface are removed. The
DefaultHeadersDecoratornow ensures all events receive a
AggregateRootnow keeps track of a version, the
ConstructionBehaviourtrait has been updated to reflect this and shows how it’s implemented.
AggregateRootTestCasenow requires you to implement the
newAggregateRootIdmethod to be able to return a stable aggregate root id from the
MessageDispatcherChainis introduced to be able to chain multiple dispatchers together. This allows users to compose a dispatching system that combined synchronous and a-synchronous message handling.
BaseAggregateRootbehaviour is now extracted into traits so you can choice to implement certain concerns yourself without overriding methods.