Skip to content

Commit 4a1b947

Browse files
committed
Fix github pipeline tests
1 parent 0ef8908 commit 4a1b947

4 files changed

Lines changed: 20 additions & 9426 deletions

File tree

Classes/DataProcessing/RelationProcessor.php

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@
1313
use TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer;
1414
use TYPO3\CMS\Frontend\ContentObject\DataProcessorInterface;
1515

16-
final class RelationProcessor implements DataProcessorInterface
16+
final readonly class RelationProcessor implements DataProcessorInterface
1717
{
1818
public function __construct(
19-
private readonly ConnectionPool $connectionPool,
20-
private readonly ContentDataProcessor $contentDataProcessor
19+
private ConnectionPool $connectionPool,
20+
private ContentDataProcessor $contentDataProcessor
2121
) {
2222
}
2323

@@ -42,7 +42,8 @@ public function process(ContentObjectRenderer $cObj, array $contentObjectConfigu
4242

4343
foreach ($relations as $key => $record) {
4444
$recordContentObjectRenderer = GeneralUtility::makeInstance(ContentObjectRenderer::class);
45-
$recordContentObjectRenderer->start($record, $GLOBALS['TCA'][$table]['columns'][$field]['config']['foreign_table'], $request);
45+
$recordContentObjectRenderer->setRequest($request);
46+
$recordContentObjectRenderer->start($record, $GLOBALS['TCA'][$table]['columns'][$field]['config']['foreign_table']);
4647
$processedRecordVariables[$key] = ['data' => $record];
4748
$processedRecordVariables[$key] = $this->contentDataProcessor->process(
4849
$recordContentObjectRenderer,
@@ -61,10 +62,11 @@ public function process(ContentObjectRenderer $cObj, array $contentObjectConfigu
6162
public function getRelation(ContentObjectRenderer $cObj, string $table, string $field, int $uid): array
6263
{
6364
$tcaConfig = $GLOBALS['TCA'][$table]['columns'][$field]['config'] ?? throw new RuntimeException(
64-
'TCA config for ' . $table . '.' . $field . ' not found'
65+
'TCA config for ' . $table . '.' . $field . ' not found',
66+
9447139781
6567
);
6668

67-
$foreignTable = $tcaConfig['foreign_table'] ?? throw new RuntimeException('TCA config foreign_table not found');
69+
$foreignTable = $tcaConfig['foreign_table'] ?? throw new RuntimeException('TCA config foreign_table not found', 4960954942);
6870

6971
if (isset($tcaConfig['foreign_field'])) {
7072
$rows = $this->getRowsForeignField($tcaConfig, $foreignTable, $uid);
@@ -77,7 +79,7 @@ public function getRelation(ContentObjectRenderer $cObj, string $table, string $
7779
$records = [];
7880

7981
$pageRepository = $cObj->getTypoScriptFrontendController()?->sys_page;
80-
$pageRepository instanceof PageRepository ?: throw new RuntimeException('PageRepository not found');
82+
$pageRepository instanceof PageRepository ?: throw new RuntimeException('PageRepository not found', 4904331429);
8183

8284
foreach ($rows as $row) {
8385
// Versioning preview:
@@ -172,18 +174,18 @@ private function getRowsLocalField(array $tcaConfig, string $foreignTable, strin
172174
private function getRowsMM(mixed $tcaConfig, mixed $foreignTable, int $uid): array
173175
{
174176
if (isset($tcaConfig['MM_hasUidField'])) {
175-
throw new RuntimeException('TCA config MM_hasUidField not supported');
177+
throw new RuntimeException('TCA config MM_hasUidField not supported', 5983628871);
176178
}
177179

178180
if (isset($tcaConfig['MM_is_foreign'])) {
179-
throw new RuntimeException('TCA config MM_is_foreign not supported');
181+
throw new RuntimeException('TCA config MM_is_foreign not supported', 9865861365);
180182
}
181183

182184
if (isset($tcaConfig['MM_oppositeUsage'])) {
183-
throw new RuntimeException('TCA config MM_oppositeUsage not supported');
185+
throw new RuntimeException('TCA config MM_oppositeUsage not supported', 5536564928);
184186
}
185187

186-
$mmTable = $tcaConfig['MM'] ?? throw new RuntimeException('TCA config MM not found');
188+
$mmTable = $tcaConfig['MM'] ?? throw new RuntimeException('TCA config MM not found', 3744368881);
187189

188190
$matchFields = $tcaConfig['MM_match_fields'] ?? [];
189191

composer.json

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@
77
"type": "typo3-cms-extension",
88
"require": {
99
"php": "~8.2.0 || ~8.3.0 || ~8.4.0",
10-
"typo3/cms-core": "^12.0 || ^13.4",
11-
"typo3/cms-frontend": "^12.0 || ^13.4"
10+
"typo3/cms-core": "^12.4 || ^13.4",
11+
"typo3/cms-frontend": "^12.4 || ^13.4"
1212
},
1313
"require-dev": {
1414
"pluswerk/grumphp-config": "^7.2.0 || ^10.1.4",
15-
"saschaegerer/phpstan-typo3": "^1.8.2 || ^2.1.1",
16-
"ssch/typo3-rector": "^1.3.5 || ^3.6.2"
15+
"saschaegerer/phpstan-typo3": "^1.10.2 || ^2.1.1",
16+
"ssch/typo3-rector": "*"
1717
},
1818
"autoload": {
1919
"psr-4": {
@@ -28,7 +28,8 @@
2828
"pluswerk/grumphp-config": true,
2929
"typo3/class-alias-loader": true,
3030
"typo3/cms-composer-installers": true
31-
}
31+
},
32+
"lock": false
3233
},
3334
"extra": {
3435
"typo3/cms": {

0 commit comments

Comments
 (0)