Skip to content

Commit

Permalink
Upgrade predis to v2.3.0
Browse files Browse the repository at this point in the history
Fixes a bug with $server['scheme'] and simplifies some of the config
code.

Fixes #214
  • Loading branch information
erikdubbelboer committed Dec 20, 2024
1 parent 3e60b21 commit 543cbc7
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 35 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"require": {
"ext-mbstring": "*",
"ext-json": "*",
"predis/predis": "v1.1.9",
"predis/predis": "v2.3.0",
"paragonie/random_compat": ">=2"
},
"minimum-stability": "stable",
Expand Down
42 changes: 20 additions & 22 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 12 additions & 12 deletions includes/common.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,20 +95,20 @@
$server['keys'] = $config['keys'];
}

if (!isset($config['scansize'])) {
$config['scansize'] = 1000;
}

if (!isset($config['scanmax'])) {
$config['scanmax'] = 0;
}

if (!isset($server['scansize'])) {
$server['scansize'] = $config['scansize'];
if (isset($config['scansize'])) {
$server['scansize'] = $config['scansize'];
} else {
$server['scansize'] = 1000;
}
}

if (!isset($server['scanmax'])) {
$server['scanmax'] = $config['scanmax'];
if (isset($config['scanmax'])) {
$server['scanmax'] = $config['scanmax'];
} else {
$server['scanmax'] = 0;
}
}

if (!isset($server['serialization'])) {
Expand All @@ -125,8 +125,8 @@
$config['showEmptyNamespaceAsKey'] = false;
}

if (!isset($config['scheme']) || empty($config['scheme'])) {
$config['scheme'] = 'tcp';
if (!isset($server['scheme']) || empty($server['scheme'])) {
$server['scheme'] = 'tcp';
}

// Setup a connection to Redis.
Expand Down

0 comments on commit 543cbc7

Please sign in to comment.