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.