Skip to content

feat(phpredis): add compression and compression_level options#762

Merged
ostrolucky merged 3 commits into
snc:masterfrom
koekaverna:feat/compression-options
Jun 5, 2026
Merged

feat(phpredis): add compression and compression_level options#762
ostrolucky merged 3 commits into
snc:masterfrom
koekaverna:feat/compression-options

Conversation

@koekaverna

Copy link
Copy Markdown
Contributor

Summary

  • Adds compression config option mapped to Redis::OPT_COMPRESSION (7), supporting none, lzf, zstd, lz4
  • Adds compression_level config option mapped to Redis::OPT_COMPRESSION_LEVEL (9)
  • Applied to all phpredis client types: standard, cluster, and array

Closes #331

Test plan

  • testLoadCompressionType — verifies string→constant mapping per client factory
  • testLoadCompressionTypeFail — verifies invalid type throws InvalidConfigurationException
  • testClientCompressionOption — verifies config node is parsed and passed through correctly

Adds support for Redis::OPT_COMPRESSION (7) and Redis::OPT_COMPRESSION_LEVEL (9)
for phpredis, cluster, and array clients. Supported compression types: none, lzf,
zstd, lz4.
Comment thread src/Factory/PhpredisClientFactory.php Outdated
@koekaverna koekaverna force-pushed the feat/compression-options branch from 604ce40 to b6dfda8 Compare June 5, 2026 08:15
@ostrolucky ostrolucky merged commit b3bc736 into snc:master Jun 5, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature Request: Compression

2 participants