Skip to content
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

Adjustments for prooph/event-store v6 #10

Merged
merged 2 commits into from
Sep 30, 2015

Conversation

codeliner
Copy link
Member

No description provided.

@codeliner
Copy link
Member Author

ping @prolic

@codeliner codeliner added this to the 4.0 Release milestone Sep 29, 2015
* @param object $anEventSourcedAggregateRoot
* @param Message[] $events
*/
public function applyPendingStreamEvents($anEventSourcedAggregateRoot, array $events)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the only method that wants an array instead of an iterator. What would you think of making this consistent with the other methods?

To achieve this, we would do in the AggregateRootDecorator this:

public function extractRecordedEvents(AggregateRoot $anAggregateRoot)
{
    return new \ArrayIterator($anAggregateRoot->popRecordedEvents());
}

Also update the ConfigurableAggregateTranslator and the AggregateRepository classes.

On the other hand, it' not really needed, but the methods here would have consistent method headers.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Like discussed yesterday in the chat I think we can keep it as-is. The \Iterator type hint represents the event stream and the array type hint says that the given events are not the stream but only the current pending events.
@prolic What do you think?

prolic added a commit that referenced this pull request Sep 30, 2015
Adjustments for prooph/event-store v6
@prolic prolic merged commit 3ac58f4 into prooph:develop Sep 30, 2015
@prolic
Copy link
Member

prolic commented Sep 30, 2015

accepted :)

@codeliner
Copy link
Member Author

great 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants