Skip to content

Commit

Permalink
feat: makes EventId enrichable
Browse files Browse the repository at this point in the history
  • Loading branch information
matiux committed Jun 1, 2023
1 parent fafc842 commit 4ea1a46
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/Matiux/DDDStarterPack/Event/DomainEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ abstract public function enrich(EnrichOptions $enrichOptions): self;
protected function enrichedDomainEventMeta(EnrichOptions $enrichOptions): DomainEventMeta
{
return new DomainEventMeta(
$this->meta->eventId,
$enrichOptions->eventId ?? $this->meta->eventId,
$enrichOptions->domainTrace,
$this->meta->version,
);
Expand Down
1 change: 1 addition & 0 deletions src/Matiux/DDDStarterPack/Event/EnrichOptions.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
{
public function __construct(
public DomainTrace $domainTrace,
public null|EventId $eventId = null,
) {
}
}

0 comments on commit 4ea1a46

Please sign in to comment.