Skip to content

Commit

Permalink
Fixed event version in the AggregateRootTrait
Browse files Browse the repository at this point in the history
  • Loading branch information
tg666 committed Nov 25, 2024
1 parent e9673ea commit 35b923e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ArchitectureBundle/Domain/AggregateRootTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ protected function apply(AbstractDomainEvent $event): void
protected function recordThat(AbstractDomainEvent $event, bool $apply = true): void
{
++$this->version;
$this->recordedEvents[] = $event->withVersion($this->version);
$this->recordedEvents[] = $event = $event->withVersion($this->version);

if ($apply) {
$this->apply($event);
Expand Down

0 comments on commit 35b923e

Please sign in to comment.