-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Snapshot args incorrect #51
Comments
$ar->toString()
Am 09.02.2017 07:46 schrieb "Bas Kamer" <[email protected]>:
… [Symfony\Component\Debug\Exception\FatalThrowableError]
Type error: Argument 1 passed to Prooph\SnapshotStore\Snapshot::__construct() must be of the type string, object given, called in /home-projects/api-plhw-development/deploy/relea
ses/20161219092409UTC/vendor/prooph/event-sourcing/src/Aggregate/SnapshotReadModel.php on line 91
https://github.com/prooph/event-sourcing/blob/develop/src/Aggregate/
SnapshotReadModel.php#L86-L88
Tell me that should be get_class($aggregateRoot) and I'll PR it
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#51>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAYEvEIGhpMS_PJTIBhxaq8dLoiIrLLjks5ralO3gaJpZM4L7hOl>
.
|
? there is no toString method on the AR... Should I implement that? No... Looking at the signature of Snapshot::__construct the first argument should the the aggregateType.
Then get_class() should do it? |
I now see the following is used elsewhere to get the AR type (vendor/prooph/snapshotter/src/StreamSnapshotProjection.php) and would prevent adding the toString method to the aggregate. I think that would be better, no?
|
nice hint: @codeliner what do you think? |
looks good 👍 |
ok, ill do a pr |
https://github.com/prooph/event-sourcing/blob/develop/src/Aggregate/SnapshotReadModel.php#L86-L88
Tell me that should be
get_class($aggregateRoot)
and I'll PR itThe text was updated successfully, but these errors were encountered: