Domain Symfony Event vs Event?

Actually the goal they seem to be the same, although the implementation is slightly different. If I understood everything correctly, the Symfony Event more dynamic and customized, while the DomainEvent is more strict, and share only the most important, uuid, createdAt, mostly. However, the question still remains : what, why and when to use then? This is all the differences?How to distinguish a Domain Event from other events?
June 5th 19 at 21:50
1 answer
June 5th 19 at 21:52
I do things like this.
  1. One controller is a single flush() before responsum.
  2. There is a vault which "raises domain events"
  3. There is a listener that listens doctrinale event postFlush(), takes from the store all events and pays for processing dispatcher. Storage is necessary to clear necessary.

class User 
...
public static function invite(Role $role, Email $email): self {
...
 EventStore::remember(new UserInvited($email, $invitationToken));
...
}
...
It's not really clearly explains when and what to use.

How, when, and why - jaycee commented on June 5th 19 at 21:55
Well, let's just say I see no reason Not to use domain events - jeanne.Wel commented on June 5th 19 at 21:58

Find more questions by tags Problem-oriented designDesigning softwareSymfony