-
-
Notifications
You must be signed in to change notification settings - Fork 394
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Redis::connection causes segmentation fault #1883
Comments
can you run with xdebug enabled and the |
Yes of course. Running with xdebug it does indeed say infinite recursion has been detected. I've taken out the base path as it relates to a project under NDA, hope this helps though |
Minimal code to reproduce
|
So you don't have to manually parse through the stack trace, here's what the gpt has to say:
|
Not only I had to move all Redis methods to a trait file so I could exclude just that file from stan. @Phil-Barker this should of course be fixed upstream, but in the meanwhile you can fix your stan like this; includes:
- ./vendor/larastan/larastan/extension.neon
parameters:
paths:
- ...
excludePaths:
- app/Models/Traits/RedisTrait.php
use Illuminate\Support\Facades\Redis;
trait RedisTrait
{
private function redisIsMember(string $key, string|int $value): bool
{
return Redis::sIsMember($key, (string) $value);
}
private function redisMembers(string $key): array
{
return Redis::sMembers($key);
}
} |
PHPStan v1.11.1 includes a couple of fixes for recursion, could you check if this is still an issue? |
I tried with the latest php 8.3, and phpstan 1.11.1 and it still times out...
|
--level
used: 6Description
Interacting with Redis::connection causes segmentation fault
This seems to be related to phpstan/phpstan#6300 which was fixed in
phpstan/phpstan-src@9ab4e6f
Running tests with just phpstan pass fine, but with the larastan extension included it causes a segmentation fault anywhere that
Redis::connection
is used.I'm using phpstan 1.10.62
Laravel code where the issue was found
The text was updated successfully, but these errors were encountered: