pccomponentes/ddd
Mini framework PHP para construir aplicaciones con DDD + CQRS + Event Sourcing, orientado a la escritura. Propone arquitectura hexagonal (Application/Domain/Infrastructure/EntryPoint/Util) y guía de capas, dependencias y persistencia basada en eventos.
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.
Uuid::v7() in src/Domain/Model/ValueObject/Uuid.phpUuid::create() as the generic factory for new UUIDsUuid::v4() available for explicit v4 generationMain advantages of v7 over v4:
v4 is still fine when you only need simple, fully random identifiers.
Changes:
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
feat: add equivalentTo function to collection value object
function is similar to equalTo, but:
fix: remove impossible return type cases
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
feat: Add unique id value object
#31 Updated return type from self to static
#30 Add missing return types
added: Obtain collection first element
Patch deserializers
How can I help you explore Laravel packages today?