Skip to content

Commit 056b2af

Browse files
committed
Switching from PHP 8.1 to 8.2.
1 parent 5e0ad14 commit 056b2af

11 files changed

Lines changed: 71 additions & 51 deletions

File tree

.github/workflows/ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
strategy:
99
fail-fast: false
1010
matrix:
11-
php: ['8.1']
11+
php: ['8.2']
1212
steps:
1313
- uses: actions/checkout@v2
1414
- name: Setup PHP with pecl and extensions
@@ -33,7 +33,7 @@ jobs:
3333
strategy:
3434
fail-fast: false
3535
matrix:
36-
php: ['8.1']
36+
php: ['8.2']
3737
steps:
3838
- uses: actions/checkout@v2
3939
- name: Setup PHP with pecl and extensions
@@ -56,7 +56,7 @@ jobs:
5656
strategy:
5757
fail-fast: false
5858
matrix:
59-
php: ['8.1']
59+
php: ['8.2']
6060
steps:
6161
- uses: actions/checkout@v2
6262
- name: Setup PHP with pecl and extensions

app/V1Module/presenters/WorkerFilesPresenter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ public function actionDownloadSubmissionArchive(string $type, string $id)
106106
);
107107
}
108108
}
109-
$this->sendStorageFileResponse($file, "${type}_${id}.zip");
109+
$this->sendStorageFileResponse($file, "{$type}_{$id}.zip");
110110
}
111111

112112
/**

app/helpers/Emails/Notifications/Reviews/ReviewsEmailSender.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ private function createReviewNotification(
118118
$latte = EmailLatteFactory::latte();
119119
$template = EmailLocalizationHelper::getTemplate(
120120
$locale,
121-
__DIR__ . "/review${notificationType}_{locale}.latte"
121+
__DIR__ . "/review{$notificationType}_{locale}.latte"
122122
);
123123

124124
$params = $this->prepareSolutionEmailParams($locale, $solution, $closed);
@@ -248,7 +248,7 @@ private function createCommentNotification(
248248
$latte = EmailLatteFactory::latte();
249249
$template = EmailLocalizationHelper::getTemplate(
250250
$locale,
251-
__DIR__ . "/comment${notificationType}_{locale}.latte"
251+
__DIR__ . "/comment{$notificationType}_{locale}.latte"
252252
);
253253

254254
$params = $this->prepareSolutionEmailParams($locale, $solution);

app/helpers/ExerciseConfig/Pipeline/Box/Boxes/BisonCompilationBox.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -117,15 +117,15 @@ public function compile(CompilationParams $params): array
117117
if ($this->hasInputPortValue(self::$ARGS_PORT_KEY)) {
118118
$args = $this->getInputPortValue(self::$ARGS_PORT_KEY)->getValue();
119119
}
120-
$args[] = "--defines=${inputBaseName}.hpp";
120+
$args[] = "--defines={$inputBaseName}.hpp";
121121
$args[] = "-o";
122-
$args[] = "${inputBaseName}.cpp";
122+
$args[] = "{$inputBaseName}.cpp";
123123
$args[] = $inputFile;
124124
$task->setCommandArguments($args);
125125

126126
// Set output names correctly and create task that will check their existence
127127
$output = $this->getOutputPortValue(self::$OUTPUT_FILES_PORT_KEY);
128-
$output->setValue(["${inputBaseName}.cpp", "${inputBaseName}.hpp"]);
128+
$output->setValue(["{$inputBaseName}.cpp", "{$inputBaseName}.hpp"]);
129129
$exists = $this->compileExistsTask($output->getDirPrefixedValue(ConfigParams::$SOURCE_DIR));
130130

131131
return [$task, $exists];

app/helpers/FileStorageManager.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ private function getUploadedPartialFilePath(UploadedPartialFile $file, int $chun
119119
$dir = self::PARTIAL_UPLOADS;
120120
$id = $file->getId();
121121
$name = $file->getName();
122-
return "$dir/${id}_${name}_$chunk";
122+
return "$dir/{$id}_{$name}_$chunk";
123123
}
124124

125125
/**
@@ -185,7 +185,7 @@ private function getUploadedFilePath(UploadedFile $file): string
185185
$dir = self::UPLOADS;
186186
$id = $file->getId();
187187
$name = $file->getName();
188-
return "$dir/${id}_$name";
188+
return "$dir/{$id}_$name";
189189
}
190190

191191
/**
@@ -359,7 +359,7 @@ private function getAttachmentFilePath(AttachmentFile $file): string
359359
$userDir = $user ? "user_$user" : "_system"; // files without user are treated as sys. files
360360
$id = $file->getId();
361361
$name = $file->getName();
362-
return "$dir/$userDir/${id}_${name}";
362+
return "$dir/$userDir/{$id}_{$name}";
363363
}
364364

365365
/**
@@ -406,7 +406,7 @@ private function getJobConfigPath(Submission $submission): string
406406
$dir = self::augmentDir(self::JOB_CONFIGS, $submission);
407407
$type = $submission::JOB_TYPE;
408408
$id = $submission->getId();
409-
return "$dir/${id}_${type}.yml";
409+
return "$dir/{$id}_{$type}.yml";
410410
}
411411

412412
/**
@@ -450,7 +450,7 @@ private function getSolutionArchivePath(Solution $solution): string
450450
{
451451
$dir = self::augmentDir(self::SOLUTIONS, $solution);
452452
$id = $solution->getId();
453-
return "$dir/${id}.zip";
453+
return "$dir/{$id}.zip";
454454
}
455455

456456
/**
@@ -508,7 +508,7 @@ public function deleteSolutionArchive(Solution $solution): bool
508508
*/
509509
private function getWorkerSubmissionArchivePath(string $type, string $id): string
510510
{
511-
return self::WORKER_DOWNLOADS . "/${id}_${type}.zip";
511+
return self::WORKER_DOWNLOADS . "/{$id}_{$type}.zip";
512512
}
513513

514514
/**
@@ -562,7 +562,7 @@ public function createWorkerSubmissionArchive(Submission $submission): ?IImmutab
562562
*/
563563
private function getWorkerUploadResultsArchivePath(string $type, string $submissionId): string
564564
{
565-
return self::WORKER_UPLOADS . "/${submissionId}_${type}.zip";
565+
return self::WORKER_UPLOADS . "/{$submissionId}_{$type}.zip";
566566
}
567567

568568
/**
@@ -599,7 +599,7 @@ private function getResultsArchivePath(Submission $submission): string
599599
$dir = self::augmentDir(self::RESULTS, $submission);
600600
$type = $submission::JOB_TYPE;
601601
$id = $submission->getId();
602-
return "$dir/${id}_${type}.zip";
602+
return "$dir/{$id}_{$type}.zip";
603603
}
604604

605605
/**

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@
2222
},
2323
"config": {
2424
"platform": {
25-
"php": "8.1.0"
25+
"php": "8.2.0"
2626
}
2727
},
2828
"require": {
29-
"php": ">=8.1",
29+
"php": ">=8.2",
3030
"ext-yaml": ">=2.0",
3131
"ext-json": ">=1.7",
3232
"ext-zip": ">=1.15",

composer.lock

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

migrations/Version20200421000600.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ private function isUniform($config)
3535
if (!isset($yaml['testWeights']) || !is_array($yaml['testWeights'])) {
3636
return false;
3737
}
38-
38+
3939
$lastValue = null;
4040
foreach ($yaml['testWeights'] as $value) {
4141
if (!is_integer($value)) {
@@ -91,7 +91,7 @@ public function down(Schema $schema): void
9191
// get list of tests so we can use it to construct config
9292
$tests = $this->connection->executeQuery(
9393
"SELECT et.name AS `name` FROM exercise_test AS et
94-
JOIN ${table}_exercise_test AS eet ON eet.exercise_test_id = et.id WHERE eet.${table}_id = :tid",
94+
JOIN {$table}_exercise_test AS eet ON eet.exercise_test_id = et.id WHERE eet.{$table}_id = :tid",
9595
[ 'tid' => $config['tid'] ]
9696
)->fetchFirstColumn();
9797

tests/Presenters/UserCalendarsPresenter.phpt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ class TestUserCalendarsPresenter extends Tester\TestCase
3939
{
4040
global $container;
4141
$this->container = $container;
42-
$this->em = PresenterTestHelper::getEntityManager($container);
4342
$this->assignments = $container->getByType(Assignments::class);
4443
$this->userCalendars = $container->getByType(UserCalendars::class);
4544
}

tests/Presenters/UsersPresenter.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ class TestUsersPresenter extends Tester\TestCase
4646
protected $externalLogins;
4747

4848
/** @var App\Helpers\AnonymizationHelper */
49-
protected $annonymizationHelper;
49+
protected $anonymizationHelper;
5050

5151
/** @var Nette\DI\Container */
5252
protected $container;

0 commit comments

Comments
 (0)