-
Notifications
You must be signed in to change notification settings - Fork 284
Changes for the 2025 draft CCS spec #3041
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
d69098c
b98b9ca
79c8840
bc3b3b0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| <?php | ||
|
|
||
| declare(strict_types=1); | ||
|
|
||
| namespace DoctrineMigrations; | ||
|
|
||
| use Doctrine\DBAL\Schema\Schema; | ||
| use Doctrine\Migrations\AbstractMigration; | ||
|
|
||
| /** | ||
| * Auto-generated Migration: Please modify to your needs! | ||
| */ | ||
| final class Version20250706121413 extends AbstractMigration | ||
| { | ||
| public function getDescription(): string | ||
| { | ||
| return 'Update `event_feed_format` config to `ccs_api_version`'; | ||
| } | ||
|
|
||
| public function up(Schema $schema): void | ||
| { | ||
| // Change key and values to the new format | ||
| $this->addSql('UPDATE configuration SET name = \'ccs_api_version\' WHERE name = \'event_feed_format\' AND value = \'"2020-03"\''); | ||
| $this->addSql('UPDATE configuration SET name = \'ccs_api_version\', value = \'"2023-06"\' WHERE name = \'event_feed_format\' AND value = \'"2022-07"\''); | ||
| } | ||
|
|
||
| public function down(Schema $schema): void | ||
| { | ||
| // Change key and values back to the old format | ||
| $this->addSql('UPDATE configuration SET name = \'event_feed_format\' WHERE name = \'ccs_api_version\' AND value = \'"2020-03"\''); | ||
| $this->addSql('UPDATE configuration SET name = \'event_feed_format\', value = \'"2022-07"\' WHERE name = \'ccs_api_version\' AND value = \'"2023-06"\''); | ||
| // Delete it if we have a non-supported version | ||
| $this->addSql('DELETE FROM configuration WHERE name = \'ccs_api_version\''); | ||
| } | ||
|
|
||
| public function isTransactional(): bool | ||
| { | ||
| return false; | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,6 +2,7 @@ | |
|
|
||
| namespace App\DataTransferObject; | ||
|
|
||
| use App\Controller\API\AbstractRestController as ARC; | ||
| use App\Entity\ContestProblem; | ||
| use JMS\Serializer\Annotation as Serializer; | ||
|
|
||
|
|
@@ -10,6 +11,12 @@ class ContestProblemWrapper | |
| public function __construct( | ||
| #[Serializer\Inline] | ||
| protected readonly ContestProblem $contestProblem, | ||
| #[Serializer\Groups([ARC::GROUP_NONSTRICT, '2025-draft'])] | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What does this annotation do?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It only exposes it for those serializer groups. Non strict means 'expose it unless you do ?strict=1' and the draft group means: 'only expose it for this draft version'. I will change the draft version to a constant though. |
||
| protected readonly int $memoryLimit, | ||
| #[Serializer\Groups([ARC::GROUP_NONSTRICT, '2025-draft'])] | ||
| protected readonly int $outputLimit, | ||
| #[Serializer\Groups([ARC::GROUP_NONSTRICT, '2025-draft'])] | ||
| protected readonly int $codeLimit, | ||
| #[Serializer\SerializedName('test_data_count')] | ||
| protected readonly int $testDataCount | ||
| ) {} | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does
usePostClarmean? Can we change it to a descriptive name?