redis-queue
redis-queue copied to clipboard
ADD: unix socket connection support
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.