From 3c54ff638f69b15936a14bf62e014638683a16e0 Mon Sep 17 00:00:00 2001 From: Oliver Klee <typo3-coding@oliverklee.de> Date: Sat, 16 Jul 2022 14:10:41 +0200 Subject: [PATCH] [TASK] Update PHPStan PHPStan 1.8.1 removes some warnings. Used commands: > composer req --dev phpstan/phpstan:^1.8.1 > ./Build/Scripts/runTests.sh -s phpstanGenerateBaseline Resolves: #97959 Releases: main, 11.5 Change-Id: Ifaaf37add767f98d16b3e847447a2882c3c77ee8 Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/75209 Tested-by: core-ci <typo3@b13.com> Tested-by: Christian Kuhn <lolli@schwarzbu.ch> Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch> --- Build/phpstan/phpstan-baseline.neon | 10 ---------- composer.json | 2 +- composer.lock | 14 +++++++------- 3 files changed, 8 insertions(+), 18 deletions(-) diff --git a/Build/phpstan/phpstan-baseline.neon b/Build/phpstan/phpstan-baseline.neon index f48bc9a936a4..435e1f829faf 100644 --- a/Build/phpstan/phpstan-baseline.neon +++ b/Build/phpstan/phpstan-baseline.neon @@ -1615,11 +1615,6 @@ parameters: count: 1 path: ../../typo3/sysext/core/Classes/TypoScript/TemplateService.php - - - message: "#^Call to function is_array\\(\\) with mixed will always evaluate to false\\.$#" - count: 1 - path: ../../typo3/sysext/core/Classes/Utility/ArrayUtility.php - - message: "#^Else branch is unreachable because ternary operator condition is always true\\.$#" count: 1 @@ -4750,11 +4745,6 @@ parameters: count: 1 path: ../../typo3/sysext/info/Classes/Controller/TranslationStatusController.php - - - message: "#^Method TYPO3\\\\CMS\\\\Info\\\\Controller\\\\TranslationStatusController\\:\\:getLangStatus\\(\\) should return array but returns mixed\\.$#" - count: 1 - path: ../../typo3/sysext/info/Classes/Controller/TranslationStatusController.php - - message: "#^Property TYPO3\\\\CMS\\\\Install\\\\Command\\\\UpgradeWizardListCommand\\:\\:\\$input is never read, only written\\.$#" count: 1 diff --git a/composer.json b/composer.json index 15ba88b1c931..ab9ec23f18f1 100644 --- a/composer.json +++ b/composer.json @@ -117,7 +117,7 @@ "php-webdriver/webdriver": "^1.12.0", "phpspec/prophecy": "^1.15.0", "phpspec/prophecy-phpunit": "^2.0.1", - "phpstan/phpstan": "^1.8.0", + "phpstan/phpstan": "^1.8.1", "phpstan/phpstan-phpunit": "^1.1.1", "phpunit/phpunit": "^9.5.20", "typo3/cms-styleguide": "~11.5.4", diff --git a/composer.lock b/composer.lock index 2c72f0e23feb..186455bfba68 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": "46a65c64c212037bf043ed9c30358753", + "content-hash": "6f02171c220de8d590deb5fc203bd71e", "packages": [ { "name": "bacon/bacon-qr-code", @@ -7141,16 +7141,16 @@ }, { "name": "phpstan/phpstan", - "version": "1.8.0", + "version": "1.8.1", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "b7648d4ee9321665acaf112e49da9fd93df8fbd5" + "reference": "8dbba631fa32f4b289404469c2afd6122fd61d67" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/b7648d4ee9321665acaf112e49da9fd93df8fbd5", - "reference": "b7648d4ee9321665acaf112e49da9fd93df8fbd5", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/8dbba631fa32f4b289404469c2afd6122fd61d67", + "reference": "8dbba631fa32f4b289404469c2afd6122fd61d67", "shasum": "" }, "require": { @@ -7176,7 +7176,7 @@ "description": "PHPStan - PHP Static Analysis Tool", "support": { "issues": "https://github.com/phpstan/phpstan/issues", - "source": "https://github.com/phpstan/phpstan/tree/1.8.0" + "source": "https://github.com/phpstan/phpstan/tree/1.8.1" }, "funding": [ { @@ -7196,7 +7196,7 @@ "type": "tidelift" } ], - "time": "2022-06-29T08:53:31+00:00" + "time": "2022-07-12T16:08:06+00:00" }, { "name": "phpstan/phpstan-phpunit", -- GitLab