From 20cf44d040a82ad929b27ba02f1e61c62a2a9ac1 Mon Sep 17 00:00:00 2001 From: Christian Kuhn Date: Mon, 23 Mar 2026 22:19:07 +0100 Subject: [PATCH] [TASK] Raise dev dependencies (#711) > composer req --dev phpstan/phpstan:^2.1.42 > composer req --dev phpstan/phpstan-phpunit:^2.0.16 > composer req --dev friendsofphp/php-cs-fixer:^3.94.2 Adapt a ActionService detail to happify phpstan. Also adapt workflows to use ubuntu-24.04 and actions/checkout@v6 to avoid github deprecation notices. --- .github/workflows/ci.yml | 4 ++-- .../Functional/Framework/DataHandling/ActionService.php | 4 +++- composer.json | 6 +++--- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8f9c4dd8..2bbbd203 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,14 +9,14 @@ jobs: testsuite: name: all tests - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 strategy: matrix: php: [ '8.1' , '8.2', '8.3', '8.4', '8.5' ] steps: - name: Checkout ${{ github.event_name == 'workflow_dispatch' && github.head_ref || '' }} - uses: actions/checkout@v4 + uses: actions/checkout@v6 with: ref: ${{ github.event_name == 'workflow_dispatch' && github.head_ref || '' }} diff --git a/Classes/Core/Functional/Framework/DataHandling/ActionService.php b/Classes/Core/Functional/Framework/DataHandling/ActionService.php index 774b24ae..d920e3b0 100644 --- a/Classes/Core/Functional/Framework/DataHandling/ActionService.php +++ b/Classes/Core/Functional/Framework/DataHandling/ActionService.php @@ -72,6 +72,7 @@ public function createNewRecords(int $pageId, array $tableRecordData): array $currentUid = null; $previousTableName = null; $previousUid = null; + $hasPrevious = false; foreach ($tableRecordData as $tableName => $recordData) { $recordData = $this->resolvePreviousUid($recordData, $currentUid); if (!isset($recordData['pid'])) { @@ -80,7 +81,7 @@ public function createNewRecords(int $pageId, array $tableRecordData): array $currentUid = $this->getUniqueIdForNewRecords(); $newTableIds[$tableName][] = $currentUid; $dataMap[$tableName][$currentUid] = $recordData; - if ($previousTableName !== null && $previousUid !== null) { + if ($hasPrevious) { $dataMap[$previousTableName][$previousUid] = $this->resolveNextUid( $dataMap[$previousTableName][$previousUid], $currentUid @@ -88,6 +89,7 @@ public function createNewRecords(int $pageId, array $tableRecordData): array } $previousTableName = $tableName; $previousUid = $currentUid; + $hasPrevious = true; } $this->createDataHandler(); $this->dataHandler->start($dataMap, []); diff --git a/composer.json b/composer.json index e999f4e1..0c0966fa 100644 --- a/composer.json +++ b/composer.json @@ -59,9 +59,9 @@ } }, "require-dev": { - "friendsofphp/php-cs-fixer": "^3.65.0", - "phpstan/phpstan": "^2.0.2", - "phpstan/phpstan-phpunit": "^2.0.1", + "friendsofphp/php-cs-fixer": "^3.94.2", + "phpstan/phpstan": "^2.1.42", + "phpstan/phpstan-phpunit": "^2.0.16", "typo3/cms-workspaces": "12.*.*@dev || 13.*.*@dev" }, "replace": {