From 89c73d6832b9da77e5f517f301d74e2f70663976 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 released, 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/+/82932 Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de> Tested-by: Benjamin Franzke <ben@bnf.dev> Reviewed-by: Stefan Bürk <stefan@buerk.tech> Tested-by: core-ci <typo3@b13.com> Reviewed-by: Benjamin Franzke <ben@bnf.dev> Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de> 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 b1917fd873d9..bc0e9a57921a 100644 --- a/Build/phpstan/phpstan-baseline.neon +++ b/Build/phpstan/phpstan-baseline.neon @@ -195,11 +195,6 @@ parameters: count: 1 path: ../../typo3/sysext/backend/Classes/ViewHelpers/ThumbnailViewHelper.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: "#^Negated boolean expression is always false\\.$#" count: 1 diff --git a/composer.json b/composer.json index fda4147adc93..83a3f4ffd2c6 100644 --- a/composer.json +++ b/composer.json @@ -112,7 +112,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 87b6b7c3782e..f0150b251145 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": "bb13d8373c8377c4841dca4b7c354a13", + "content-hash": "0fd83c50521197d5678a4a23076ea284", "packages": [ { "name": "bacon/bacon-qr-code", @@ -6508,16 +6508,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": { @@ -6566,7 +6566,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 50acc8ed5e74..f47e374c815f 100644 --- a/typo3/sysext/form/Classes/Controller/FormEditorController.php +++ b/typo3/sysext/form/Classes/Controller/FormEditorController.php @@ -277,7 +277,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) { @@ -311,7 +311,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