Add redis, igbinary extension for Windows

This commit is contained in:
crazywhalecc 2024-08-12 12:11:17 +08:00 committed by Jerry Ma
parent 17c27cb7e8
commit 51442dc9ac
3 changed files with 16 additions and 6 deletions

View File

@ -205,11 +205,14 @@
}, },
"igbinary": { "igbinary": {
"support": { "support": {
"Windows": "wip",
"BSD": "wip" "BSD": "wip"
}, },
"type": "external", "type": "external",
"source": "igbinary" "source": "igbinary",
"ext-suggests": [
"session",
"apcu"
]
}, },
"imagick": { "imagick": {
"support": { "support": {
@ -537,7 +540,6 @@
}, },
"redis": { "redis": {
"support": { "support": {
"Windows": "wip",
"BSD": "wip" "BSD": "wip"
}, },
"type": "external", "type": "external",
@ -547,7 +549,7 @@
"session", "session",
"igbinary" "igbinary"
], ],
"lib-suggests": [ "lib-suggests-unix": [
"zstd", "zstd",
"liblz4" "liblz4"
] ]

View File

@ -23,4 +23,12 @@ class redis extends Extension
} }
return $arg; 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;
}
} }

View File

@ -20,12 +20,12 @@ $upx = true;
// If you want to test your added extensions and libs, add below (comma separated, example `bcmath,openssl`). // If you want to test your added extensions and libs, add below (comma separated, example `bcmath,openssl`).
$extensions = match (PHP_OS_FAMILY) { $extensions = match (PHP_OS_FAMILY) {
'Linux', 'Darwin' => 'iconv', '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`). // If you want to test lib-suggests feature with extension, add them below (comma separated, example `libwebp,libavif`).
$with_libs = match (PHP_OS_FAMILY) { $with_libs = match (PHP_OS_FAMILY) {
'Linux', 'Darwin' => 'libcares', 'Linux', 'Darwin' => '',
'Windows' => '', 'Windows' => '',
}; };