Bug report
The following code snippet results in Cannot unpack array with string keys, but phpstan says there is no error:
function foo(int ...$is): array
{
return [...$is];
}
foo(...['a' => 2]);
Code snippet that reproduces the problem
https://phpstan.org/r/f271ae5f-b3e9-4444-9d9b-1c617ded9e95
Expected output
Some error that string keys are not supported in unpacked arrays
Did PHPStan help you today? Did it make you happy in any way?
Love it!