Skip to content

Releases: PcComponentes/ddd

v4.6.0

26 Mar 11:28
e456a79

Choose a tag to compare

Summary

Add UUID v7 generation support to the Uuid value object.

This change introduces a dedicated v7() factory method and adds a generic create() factory that now generates UUID v7 by default.

Changes

  • add Uuid::v7() in src/Domain/Model/ValueObject/Uuid.php
  • add Uuid::create() as the generic factory for new UUIDs
  • keep Uuid::v4() available for explicit v4 generation

Context

Main advantages of v7 over v4:

  • Better database insert performance
  • Less index fragmentation
  • Natural sorting by creation time
  • Easier debugging and traceability
  • Still works well in distributed systems without central coordination

v4 is still fine when you only need simple, fully random identifiers.

v4.5.0

07 Mar 12:13
c08c835

Choose a tag to compare

Changes:

  • refactor: remove 'abstract' access modifier from VOs

Notes:

Before: you must create a child VO class that extend VO class
After: you can use parent VO (Ex: StringValueObject) without create child class

v4.4.0

17 Feb 11:16
b88d9d4

Choose a tag to compare

feat: add equivalentTo function to collection value object

function is similar to equalTo, but:

  • equalTo: two identical collections with different order returned false.
  • equivalentTo: two equal collections with different order return true.

v4.3.1

11 Feb 12:43
abad1e5

Choose a tag to compare

fix: remove impossible return type cases

v4.3.0

11 Feb 11:16
5542a26

Choose a tag to compare

  • feat: override all date time factory functions

v4.2.1

13 Jan 11:12
abeffb9

Choose a tag to compare

fix: prevent generate not UTC datetime

This value object was thinking for use UTC as TimeZone standar. However, it allow set other timezone by passing it on "from" factory:

$date = DateTimeValueObject::from('2025-01-10T15:16:11+01:00')

echo $date->format(\DATE_ATOM) ; // result 2025-01-10T15:16:11+01:00

Before this fix, date was transformed to UTC, expected result: 2025-01-10T14:16:11+00:00

v4.2.0

06 Jul 11:48
15fa381

Choose a tag to compare

  • Add date value object #40
  • Renamed DateTimeRangeValeObject to DateTimeRangeValueObject and deprecated the first.
  • Added value method to Value interface

v4.1.0

26 Oct 06:41
9120ee8

Choose a tag to compare

feat: Add unique id value object

v4.0.1

22 Sep 10:03
46a57c2

Choose a tag to compare

  • fix: Keep microseconds in DateTimeValueObject #38

v4.0.0

20 Sep 10:18
9b64f2a

Choose a tag to compare

  • feat: allow set occurred on datetime format
  • refactor: remove aggregate message aggregate uuid support
  • refactor: add static return types to factories