Skip to content

Commit

Permalink
Add redis, igbinary extension for Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
crazywhalecc committed Aug 12, 2024
1 parent 17c27cb commit 51442dc
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 6 deletions.
10 changes: 6 additions & 4 deletions config/ext.json
Original file line number Diff line number Diff line change
Expand Up @@ -205,11 +205,14 @@
},
"igbinary": {
"support": {
"Windows": "wip",
"BSD": "wip"
},
"type": "external",
"source": "igbinary"
"source": "igbinary",
"ext-suggests": [
"session",
"apcu"
]
},
"imagick": {
"support": {
Expand Down Expand Up @@ -537,7 +540,6 @@
},
"redis": {
"support": {
"Windows": "wip",
"BSD": "wip"
},
"type": "external",
Expand All @@ -547,7 +549,7 @@
"session",
"igbinary"
],
"lib-suggests": [
"lib-suggests-unix": [
"zstd",
"liblz4"
]
Expand Down
8 changes: 8 additions & 0 deletions src/SPC/builder/extension/redis.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,12 @@ public function getUnixConfigureArg(): string
}
return $arg;
}

public function getWindowsConfigureArg(): string
{
$arg = '--enable-redis';
$arg .= $this->builder->getExt('session') ? ' --enable-redis-session' : ' --disable-redis-session';
$arg .= $this->builder->getExt('igbinary') ? ' --enable-redis-igbinary' : ' --disable-redis-igbinary';
return $arg;
}
}
4 changes: 2 additions & 2 deletions src/globals/test-extensions.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@
// If you want to test your added extensions and libs, add below (comma separated, example `bcmath,openssl`).
$extensions = match (PHP_OS_FAMILY) {
'Linux', 'Darwin' => 'iconv',
'Windows' => 'amqp,apcu,iconv',
'Windows' => 'igbinary,redis,session',
};

// If you want to test lib-suggests feature with extension, add them below (comma separated, example `libwebp,libavif`).
$with_libs = match (PHP_OS_FAMILY) {
'Linux', 'Darwin' => 'libcares',
'Linux', 'Darwin' => '',
'Windows' => '',
};

Expand Down

0 comments on commit 51442dc

Please sign in to comment.