redis-queue icon indicating copy to clipboard operation
redis-queue copied to clipboard

ADD: unix socket connection support

Open willvar opened this issue 6 months ago • 0 comments

The upstream phpredis extension supports connecting to Redis using Unix sockets. However, the current connection method in this project uses parse_url($address, PHP_URL_HOST), which inadvertently filters out Unix socket paths. This pull request introduces a check using str_starts_with($address, 'unix:///') before the parse_url call. If the address starts with unix:///, it is directly passed to the subsequent connection logic, preserving the functionality for Unix socket connections. Otherwise, the existing parsing mechanism remains unchanged. Are there any alternative or more robust approaches you would recommend for supporting Unix socket connections? I'm open to any suggestions you might have.

willvar avatar May 14 '25 09:05 willvar