B
B
BonBon Slick2018-05-15 22:37:56
symfony
BonBon Slick, 2018-05-15 22:37:56

Domain Event vs Symfony Event?

Actually, their goals seem to be the same, although the implementation is slightly different. If I understood everything correctly, then Symfony Event is more dynamic and customizable, while DomainEvent is more strict, and fumbles only the most important, uuid, createdAt basically. However, the question still remains what, why and when to apply then? Are these all differences? How to distinguish Domain Event from other events?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Artemy Lapko, 2018-05-30
@artemylapko

I do something like this.

class User 
...
public static function invite(Role $role, Email $email): self {
    ...
    EventStore::remember(new UserInvited($email, $invitationToken));
    ...
}
...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question