Project

General

Profile

Actions

Bug #100850

closed

phpstan max nightly fails with phpstan 1.10.15

Added by Anja Leichsenring over 1 year ago. Updated 5 months ago.

Status:
Closed
Priority:
Should have
Category:
Tests
Target version:
-
Start date:
2023-05-10
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
12
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

The error turned up is:
------ -----------------------------------------------------------------
228 Line core/Classes/Authentication/AuthenticationService.php
229 ------ -----------------------------------------------------------------
230 227 Parameter #2 $values of function vsprintf expects
231 array<bool|float|int|string|null>, array<int|string, array<int,
232 mixed>> given.
233 ------ -----------------------------------------------------------------

The function in question is
/* * @param string $message Message to output * @param array<int,mixed> $params
*/
protected function writeLogMessage(string $message, ...$params): void

there are 3 usages, all of them pass $this->writeLogMessage(string, string), what makes the second parameter into array<int, string>

When I change the docblock accordingly, I end up with
------ -----------------------------------------------------------------------------------------------------------------------------------
Line core/Classes/Authentication/AuthenticationService.php
------ -----------------------------------------------------------------------------------------------------------------------------------
227 Parameter #2 $values of function vsprintf expects array<bool|float|int|string|null>, array<int|string, array<int, string>> given.
------ -----------------------------------------------------------------------------------------------------------------------------------

which is not correct, no nested arrays anywhere around.

I decided to include the error into the baseline file to suppress the test failure. Any feedback here is very much welcome, in case my analysis is incorrect I'd like to improve.

Actions #1

Updated by Gerrit Code Review over 1 year ago

  • Status changed from New to Under Review

Patch set 1 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/79005

Actions #2

Updated by Gerrit Code Review over 1 year ago

Patch set 2 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/79005

Actions #3

Updated by Gerrit Code Review over 1 year ago

Patch set 3 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/79005

Actions #4

Updated by Gerrit Code Review over 1 year ago

Patch set 1 for branch 12.4 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/79013

Actions #5

Updated by Anja Leichsenring over 1 year ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #6

Updated by Gerrit Code Review over 1 year ago

  • Status changed from Resolved to Under Review

Patch set 1 for branch 11.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/79014

Actions #7

Updated by Anja Leichsenring over 1 year ago

  • Status changed from Under Review to Resolved
Actions #8

Updated by Benni Mack 5 months ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF