Skip to content

Commit

Permalink
Merge pull request #53 from basz/fix-snapshotting
Browse files Browse the repository at this point in the history
lets use an available util class
  • Loading branch information
prolic authored Feb 11, 2017
2 parents 0857908 + 6690fda commit 81df9a5
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 7 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"prefer-stable": true,
"require": {
"php": "^7.1",
"prooph/common" : "4.0.x-dev",
"prooph/common" : "^4.0",
"prooph/event-store" : "7.0.x-dev"
},
"require-dev": {
Expand Down
5 changes: 0 additions & 5 deletions src/Aggregate/AggregateRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -184,11 +184,6 @@ public function getAggregateRoot(string $aggregateId)
return $eventSourcedAggregateRoot;
}

public function aggregateType(): AggregateType
{
return $this->aggregateType;
}

/**
* @param object $aggregateRoot
*/
Expand Down
2 changes: 1 addition & 1 deletion src/Aggregate/SnapshotReadModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public function persist(): void

foreach ($this->aggregateCache as $aggregateRoot) {
$snapshots[] = new Snapshot(
$this->aggregateRepository->aggregateType()->toString(),
(string) AggregateType::fromAggregateRoot($aggregateRoot),
$this->aggregateTranslator->extractAggregateId($aggregateRoot),
$aggregateRoot,
$this->aggregateTranslator->extractAggregateVersion($aggregateRoot),
Expand Down

0 comments on commit 81df9a5

Please sign in to comment.