Skip to content

Commit 6ce9d6f

Browse files
tuandptaylorotwell
andauthored
[12.x] Add PhpRedis pack ignore numbers option (#56941)
* Add phpredis pack ignore numbers support * Update PhpRedisConnector.php --------- Co-authored-by: Taylor Otwell <[email protected]>
1 parent d5ca717 commit 6ce9d6f

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/Illuminate/Redis/Connectors/PhpRedisConnector.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,11 @@ protected function createClient(array $config)
143143
if (array_key_exists('compression_level', $config)) {
144144
$client->setOption(Redis::OPT_COMPRESSION_LEVEL, $config['compression_level']);
145145
}
146+
147+
if (defined('Redis::OPT_PACK_IGNORE_NUMBERS') &&
148+
array_key_exists('pack_ignore_numbers', $config)) {
149+
$client->setOption(Redis::OPT_PACK_IGNORE_NUMBERS, $config['pack_ignore_numbers']);
150+
}
146151
});
147152
}
148153

0 commit comments

Comments
 (0)