8000 update predis connector · laravel/framework@befba4a · GitHub
[go: up one dir, main page]

Skip to content

Commit befba4a

Browse files
committed
update predis connector
1 parent 7bc897a commit befba4a

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/Illuminate/Redis/Connectors/PredisConnector.php

+6
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
use Illuminate\Redis\Connections\PredisClusterConnection;
77
use Illuminate\Redis\Connections\PredisConnection;
88
use Illuminate\Support\Arr;
9+use Illuminate\Support\Str;
910
use Predis\Client;
1011

1112
class PredisConnector implements Connector
@@ -27,6 +28,11 @@ public function connect(array $config, array $options)
2728
$formattedOptions['prefix'] = $config['prefix'];
2829
}
2930

31+
if (isset($config['host']) && str_starts_with($config['host'], 'tls://')) {
32+
$config['scheme'] = 'tls';
33+
$config['host'] = Str::after($config['host'], 'tls://');
34+
}
35+
3036
return new PredisConnection(new Client($config, $formattedOptions));
3137
}
3238

0 commit comments

Comments
 (0)
0