From 335c39a3111bd6af6ddd3cd610ddc47f69fb2801 Mon Sep 17 00:00:00 2001 From: Clark Liu Date: Sat, 2 May 2026 21:05:36 +0800 Subject: [PATCH 1/2] Set transport type for Unix socket connections --- src/Client.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Client.php b/src/Client.php index 201920b..d081a51 100644 --- a/src/Client.php +++ b/src/Client.php @@ -325,6 +325,9 @@ public function connect() $context = isset($this->_options['context']) ? $this->_options['context'] : []; $this->_connection = new AsyncTcpConnection($this->_address, $context); $this->_connection->protocol = Redis::class; + if (str_starts_with(strtolower($this->_address), 'unix://')) { + $this->_connection->transport = 'unix'; + } if(!empty($this->_options['ssl'])){ $this->_connection->transport = 'ssl'; } From 2982e056848b1aaf138d2aca275b4b510abb3903 Mon Sep 17 00:00:00 2001 From: Clark Liu Date: Sat, 2 May 2026 21:22:21 +0800 Subject: [PATCH 2/2] Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- src/Client.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Client.php b/src/Client.php index d081a51..ff5a21a 100644 --- a/src/Client.php +++ b/src/Client.php @@ -325,7 +325,7 @@ public function connect() $context = isset($this->_options['context']) ? $this->_options['context'] : []; $this->_connection = new AsyncTcpConnection($this->_address, $context); $this->_connection->protocol = Redis::class; - if (str_starts_with(strtolower($this->_address), 'unix://')) { + if (stripos($this->_address, 'unix://') === 0) { $this->_connection->transport = 'unix'; } if(!empty($this->_options['ssl'])){