repo->ofId($cmd->id); // Delete the plan from the repository $this->repo->remove($plan); // Dispatch the plan deleted event $event = new PlanDeletedEvent($plan); $this->dispatcher->dispatch($event); } }