Releases: PcComponentes/ddd
v4.6.0
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()insrc/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
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
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
fix: remove impossible return type cases
v4.3.0
- feat: override all date time factory functions
v4.2.1
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:00Before this fix, date was transformed to UTC, expected result: 2025-01-10T14:16:11+00:00
v4.2.0
v4.1.0
feat: Add unique id value object
v4.0.1
v4.0.0
- feat: allow set occurred on datetime format
- refactor: remove aggregate message aggregate uuid support
- refactor: add static return types to factories