Bug #100850
closedphpstan max nightly fails with phpstan 1.10.15
100%
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.
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
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
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
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
Updated by Anja Leichsenring over 1 year ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset b61e9c6378ada3d82e1427ef9f47b03d6e89b500.
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
Updated by Anja Leichsenring over 1 year ago
- Status changed from Under Review to Resolved
Applied in changeset d33eff2b2d6228a1289ef57403dc16eab209e714.