diff --git a/webapp/src/DataTransferObject/Shadowing/EventType.php b/webapp/src/DataTransferObject/Shadowing/EventType.php index dfa66f332e..f486f054b5 100644 --- a/webapp/src/DataTransferObject/Shadowing/EventType.php +++ b/webapp/src/DataTransferObject/Shadowing/EventType.php @@ -18,6 +18,7 @@ enum EventType: string case PROBLEMS = 'problems'; case RUNS = 'runs'; case STATE = 'state'; + case START_STATUS = 'start-status'; case SUBMISSIONS = 'submissions'; case TEAMS = 'teams'; case TEAM_MEMBERS = 'team-members'; @@ -28,6 +29,11 @@ public static function fromString(string $value): EventType return EventType::CONTESTS; } + // When encountering an error for an unknown event + // consider if we need to verify this as shadow or + // ignore it by adding the case in: + // webapp/src/DataTransferObject/Shadowing/EventType.php + // webapp/src/Service/ExternalContestSourceService.php return EventType::from($value); } diff --git a/webapp/src/Service/ExternalContestSourceService.php b/webapp/src/Service/ExternalContestSourceService.php index 54e2d96d7c..f50ccee457 100644 --- a/webapp/src/Service/ExternalContestSourceService.php +++ b/webapp/src/Service/ExternalContestSourceService.php @@ -623,7 +623,7 @@ public function importEvent(Event $event, array $eventsToSkip): void // Note the @vars here are to make PHPStan understand the correct types. $method = match ($event->type) { - EventType::ACCOUNTS, EventType::AWARDS, EventType::MAP_INFO, EventType::PERSONS, EventType::TEAM_MEMBERS => $this->ignoreEvent(...), + EventType::ACCOUNTS, EventType::AWARDS, EventType::MAP_INFO, EventType::PERSONS, EventType::START_STATUS, EventType::TEAM_MEMBERS => $this->ignoreEvent(...), EventType::STATE => $this->validateState(...), EventType::CONTESTS => $this->validateAndUpdateContest(...), EventType::JUDGEMENT_TYPES => $this->importJudgementType(...),