From 6a1832a47b86ee8f0012154aa77bcb45458ee5fb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20B=C3=BCrk?= <stefan@buerk.tech>
Date: Tue, 13 Feb 2024 06:38:58 +0100
Subject: [PATCH] [TASK] Update `phpstan/phpstan` version
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

A new PHPStan version has been releases,
which is pulled in automatically in the
composerInstallMax nightly test.

The higher version allows to remove a
ignore pattern from the baseline and
a superfluous key unset is detected.

This change raises the PHPStan version,
removes the superfluous `unset()` and
regenerates the baseline to remove the
invalid ignore pattern.

Used command(s):

> Build/Scripts/runTests.sh -s composer \
    -- require --dev "phpstan/phpstan":"^1.10.58"
> Build/Scripts/runTests.sh \
    -s phpstanGenerateBaseline

Resolves: #103105
Releases: main, 13.0, 12.4
Change-Id: I689079eaac7f9461084e6a71ff08ef716cf551e4
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/82933
Reviewed-by: Stefan Bürk <stefan@buerk.tech>
Tested-by: core-ci <typo3@b13.com>
Tested-by: Stefan Bürk <stefan@buerk.tech>
---
 Build/phpstan/phpstan-baseline.neon                  |  5 -----
 composer.json                                        |  2 +-
 composer.lock                                        | 12 ++++++------
 .../form/Classes/Controller/FormEditorController.php |  3 +--
 4 files changed, 8 insertions(+), 14 deletions(-)

diff --git a/Build/phpstan/phpstan-baseline.neon b/Build/phpstan/phpstan-baseline.neon
index 20b052fb0415..74641593e13e 100644
--- a/Build/phpstan/phpstan-baseline.neon
+++ b/Build/phpstan/phpstan-baseline.neon
@@ -230,11 +230,6 @@ parameters:
 			count: 1
 			path: ../../typo3/sysext/backend/Tests/Unit/Form/Fixtures/NodeFactory/NodeResolvers/FooResolver.php
 
-		-
-			message: "#^Call to static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertSame\\(\\) with \\*NEVER\\* and array will always evaluate to false\\.$#"
-			count: 2
-			path: ../../typo3/sysext/backend/Tests/Unit/Form/FormDataProvider/EvaluateDisplayConditionsTest.php
-
 		-
 			message: "#^Property TYPO3\\\\CMS\\\\Belog\\\\Domain\\\\Model\\\\LogEntry\\:\\:\\$newId \\(string\\) does not accept default value of type int\\.$#"
 			count: 1
diff --git a/composer.json b/composer.json
index 5df8068ef6dc..8c22b76b17b0 100644
--- a/composer.json
+++ b/composer.json
@@ -113,7 +113,7 @@
 		"friendsoftypo3/phpstan-typo3": "^0.9.0",
 		"php-webdriver/webdriver": "^1.14.0",
 		"phpstan/phpdoc-parser": "^1.25.0",
-		"phpstan/phpstan": "^1.10.57",
+		"phpstan/phpstan": "^1.10.58",
 		"phpstan/phpstan-phpunit": "^1.3.15",
 		"phpunit/phpunit": "^10.5.5",
 		"sokil/php-isocodes-db-i18n": "^4.0.19",
diff --git a/composer.lock b/composer.lock
index cf0ab60d295a..26ea885a978f 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,7 +4,7 @@
         "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
         "This file is @generated automatically"
     ],
-    "content-hash": "5ad2492e965dcdb86bc1494ac4210c14",
+    "content-hash": "d6188eae7f9f432c7834ac70477bef63",
     "packages": [
         {
             "name": "bacon/bacon-qr-code",
@@ -6699,16 +6699,16 @@
         },
         {
             "name": "phpstan/phpstan",
-            "version": "1.10.57",
+            "version": "1.10.58",
             "source": {
                 "type": "git",
                 "url": "https://github.com/phpstan/phpstan.git",
-                "reference": "1627b1d03446904aaa77593f370c5201d2ecc34e"
+                "reference": "a23518379ec4defd9e47cbf81019526861623ec2"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/phpstan/phpstan/zipball/1627b1d03446904aaa77593f370c5201d2ecc34e",
-                "reference": "1627b1d03446904aaa77593f370c5201d2ecc34e",
+                "url": "https://api.github.com/repos/phpstan/phpstan/zipball/a23518379ec4defd9e47cbf81019526861623ec2",
+                "reference": "a23518379ec4defd9e47cbf81019526861623ec2",
                 "shasum": ""
             },
             "require": {
@@ -6757,7 +6757,7 @@
                     "type": "tidelift"
                 }
             ],
-            "time": "2024-01-24T11:51:34+00:00"
+            "time": "2024-02-12T20:02:57+00:00"
         },
         {
             "name": "phpstan/phpstan-phpunit",
diff --git a/typo3/sysext/form/Classes/Controller/FormEditorController.php b/typo3/sysext/form/Classes/Controller/FormEditorController.php
index 86b5ded99353..6cbd51704709 100644
--- a/typo3/sysext/form/Classes/Controller/FormEditorController.php
+++ b/typo3/sysext/form/Classes/Controller/FormEditorController.php
@@ -307,7 +307,7 @@ class FormEditorController extends AbstractBackendController
      */
     protected function getInsertRenderablesPanelConfiguration(array $formElementsDefinition): array
     {
-        /** @var array<string, array<string, string>> $formElementsByGroup */
+        /** @var array<string, list<array<string, array{key: string, cssKey: string, label: string, sorting: int, iconIdentifier: string}>>> $formElementsByGroup */
         $formElementsByGroup = [];
 
         foreach ($formElementsDefinition as $formElementName => $formElementConfiguration) {
@@ -341,7 +341,6 @@ class FormEditorController extends AbstractBackendController
             usort($formElementsByGroup[$groupName], static function ($a, $b) {
                 return $a['sorting'] - $b['sorting'];
             });
-            unset($formElementsByGroup[$groupName]['sorting']);
 
             $groupConfiguration = GeneralUtility::makeInstance(TranslationService::class)->translateValuesRecursive(
                 $groupConfiguration,
-- 
GitLab