Add extension msgpack support (#543)

This commit is contained in:
Jerry Ma 2024-09-17 22:34:57 +08:00 committed by GitHub
parent ad098d085e
commit 2beecee219
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 28 additions and 2 deletions

View File

@ -360,6 +360,15 @@
"zlib" "zlib"
] ]
}, },
"msgpack": {
"support": {
"BSD": "wip"
},
"type": "external",
"source": "msgpack",
"arg-type-unix": "with",
"arg-type-win": "enable"
},
"mysqli": { "mysqli": {
"type": "builtin", "type": "builtin",
"arg-type": "with", "arg-type": "with",

View File

@ -514,6 +514,16 @@
"path": "LICENSE" "path": "LICENSE"
} }
}, },
"msgpack": {
"type": "url",
"url": "https://pecl.php.net/get/msgpack",
"path": "php-src/ext/msgpack",
"filename": "msgpack.tgz",
"license": {
"type": "file",
"path": "LICENSE"
}
},
"ncurses": { "ncurses": {
"type": "filelist", "type": "filelist",
"url": "https://ftp.gnu.org/pub/gnu/ncurses/", "url": "https://ftp.gnu.org/pub/gnu/ncurses/",

View File

@ -0,0 +1,7 @@
<?php
declare(strict_types=1);
assert(function_exists('msgpack_pack'));
assert(function_exists('msgpack_unpack'));
assert(msgpack_unpack(msgpack_pack(['foo', 'bar'])) === ['foo', 'bar']);

View File

@ -19,8 +19,8 @@ $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' => 'redis,igbinary', 'Linux', 'Darwin' => 'redis,igbinary,msgpack',
'Windows' => 'redis,igbinary', 'Windows' => 'redis,igbinary,msgpack',
}; };
// 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`).