repo->ofId($cmd->workspaceId); $inv = $ws->invite($cmd->email); // Dispatch event $event = new InvitationCreatedEvent($inv); $this->dispatcher->dispatch($event); return $inv; } }