Bug report
Numeric string array keys are treated as they cannot exist in arrays with string keys.
We have an array with product ids which can be numeric but do not need to be.
When we then assert that the product array key exists phpstan raises a false positive error.
$this->assertArrayHasKey('123000000000', $products);
Call to method PHPUnit\Framework\Assert::assertArrayHasKey() with '123000000000' and array<string ...> will always evaluate to false.
Code snippet that reproduces the problem
https://phpstan.org/r/1f3ae39c-9789-4bff-802c-a68b86c5cfce
This is using isset instead of assertArrayHasKey but it's showing the same source problem I assume.
Expected output
No error detected
Did PHPStan help you today? Did it make you happy in any way?
Thanks for the tool!