Skip to content

Releases: tiny-blocks/building-blocks

v2.2.0

13 May 21:48
e11abe1

Choose a tag to compare

  • Add reconstituteSequenceNumber() to AggregateRootBehavior to allow applying a persisted sequence number.
  • Update Composer package metadata (keywords).

v2.1.0

12 May 12:25
d6031a1

Choose a tag to compare

  • Remove SnapshotData::toJson() serialization belongs to adapters.
  • Move SnapshotData from Event/ to Snapshot/ namespace.
  • Introduce ModelVersion as a distinct value object, modelVersion() now returns ModelVersion instead of SequenceNumber.
  • Introduce snapshot state hook with default reflection, aggregates with infrastructure properties override it.
  • Add EventRecord::of() factory with sensible defaults.

v2.0.0

06 May 12:43
8cedb03

Choose a tag to compare

  • Move Revision from call site to DomainEvent via revision() method with default Revision::initial() in DomainEventBehavior trait.
  • Default identityName() to 'id' in EntityBehavior, removing boilerplate for aggregates following the conventional property name.
  • Replace manual class-name parsing in EventSourcingRootBehavior::applyEvent with EventRecord type accessor.
  • Add explicit eventHandlers() registration on EventSourcingRoot with backwards-compatible fallback to the when<EventShortName> convention.
  • Ship SnapshotEvery and SnapshotNever as built-in SnapshotCondition implementations.

v1.1.1

22 Apr 00:44
5d04fe2

Choose a tag to compare

  • Delegate EntityBehavior::identityEquals() to Identity::equals() (value-object equality) and adjust related Identity interfaces.
  • Rename upcaster payload hook (doUpcast()rewrite()), and rename snapshot state payload (datapayload) with corresponding test updates.
  • Add an explicit failure path when an event-sourced aggregate is missing a when* handler (currently via a native exception), plus accompanying tests and docs/config updates.

v1.1.0

18 Apr 22:28
72e9519

Choose a tag to compare

  • Replaced IDENTITY / MODEL_VERSION constants with identityName() / modelVersion() methods across entity/aggregate behaviors and updated tests/docs accordingly.
  • Made Revision, SequenceNumber, and EventType constructors private and added/expanded semantic factories (initial(), first(), of(), fromString()).
  • Added Upcasters collection with chain() plus IntermediateEvent object-mapping support (via tiny-blocks/mapper) and new upcast chain tests.

v1.0.0

18 Apr 19:21
309d89f

Choose a tag to compare

  • Introduce core domain primitives in src/ (Entity/Identity, AggregateRoot variants, event records, snapshots, upcasting).
  • Add comprehensive PHPUnit tests plus test fixture models under tests/.
  • Add project tooling and automation (Composer scripts, PHPUnit/PHPStan/Infection config, GitHub workflows) and expand.