Skip to content

Commit 63ac358

Browse files
Import language extensions when shadowing
1 parent 2ff4da6 commit 63ac358

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

webapp/src/DataTransferObject/Shadowing/LanguageEvent.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,11 @@
44

55
class LanguageEvent implements EventData
66
{
7+
/**
8+
* @param list<string>|null $extensions
9+
*/
710
public function __construct(
811
public readonly string $id,
12+
public readonly ?array $extensions = null,
913
) {}
1014
}

webapp/src/Service/ExternalContestSourceService.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -833,6 +833,10 @@ protected function validateLanguage(Event $event, EventData $data): void
833833
]);
834834
} else {
835835
$this->removeWarning($event->type, $data->id, ExternalSourceWarning::TYPE_DATA_MISMATCH);
836+
837+
$toCheck = ['extensions' => $data->extensions];
838+
839+
$this->compareOrCreateValues($event, $data->id, $language, $toCheck);
836840
}
837841
}
838842

0 commit comments

Comments
 (0)