-
Notifications
You must be signed in to change notification settings - Fork 17
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
update plugin registration #24
Conversation
ping @codeliner |
@oqq review? |
|
||
public function attachToEventStore(ActionEventEmitterEventStore $eventStore): void | ||
{ | ||
$this->eventStoreListeners[] = $eventStore->attach( | ||
ActionEventEmitterEventStore::EVENT_APPEND_TO, | ||
function (ActionEvent $event): void { | ||
if (null === $this->currentCommand || ! $this->currentCommand instanceof Message) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
null
is also NOT an instance of Message
, so this is a doubled expression I guess. Not sure about performance here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done, see #25
@@ -57,7 +62,7 @@ function (ActionEvent $event): void { | |||
1000 | |||
); | |||
|
|||
$eventEmitter->attachListener( | |||
$this->eventStoreListeners[] = $eventStore->attach( | |||
ActionEventEmitterEventStore::EVENT_CREATE, | |||
function (ActionEvent $event): void { | |||
if (null === $this->currentCommand || ! $this->currentCommand instanceof Message) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
null
is also NOT an instance of Message
, so this is a doubled expression I guess. Not sure about performance here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done, see #25
see: prooph/event-store#232