Move 'aggregateId' up
oqq opened this issue · 3 comments
The aggregateId method from EventProducerTrait and EventSourcedTrait are not related to that traits, but to the abstract AggregateRoot class which uses this traits.
So we should move this method up.
Already done in this PR: https://github.com/prooph/event-sourcing/pull/73/files
But suspended until we release the next major version
cc @prolic
not sure about this change. pinging @Xerkus (author of the traits)
The method is needed by the ClousureAggregateTranslator
And the primary goal of the traits is that you can use them without the need to extend from AggregateRoot, hence the method must be present in the AR class using the traits ...
Here is why it is included in traits: #62 (comment)
By adding it to both traits we ensure presence of aggregateId
if AggregateRoot or one of the traits is used.
You can safely remove them and that won't be a BC break btw. Abstract methods are implemented in users code.