-
-
Notifications
You must be signed in to change notification settings - Fork 934
Closed
phpstan/phpstan-src
#4409Labels
Description
Bug report
PHPStan 1.10.41 introduced a bunch of fixed signatures for Redis (https://github.com/phpstan/phpstan/releases/tag/1.10.41), thanks to @Vaalyn. Some previously fine code is now not passing though, specifically because the strong typing now incorrectly causes PHPStan to think Redis calls are repeatable.
Code snippet that reproduces the problem
https://phpstan.org/r/1d8101fa-a6d5-4bcb-b858-20045e24c344
Expected output
This should just pass, the callback is expected to fill the cache in Redis, causing a different result on the second test.
Even without the callback, another process could fill the key in the microseconds between both calls.
Did PHPStan help you today? Did it make you happy in any way?
Of course 😄