Skip to content

Commit

Permalink
Add extension msgpack support (#543)
Browse files Browse the repository at this point in the history
  • Loading branch information
crazywhalecc authored Sep 17, 2024
1 parent ad098d0 commit 2beecee
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 2 deletions.
9 changes: 9 additions & 0 deletions config/ext.json
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,15 @@
"zlib"
]
},
"msgpack": {
"support": {
"BSD": "wip"
},
"type": "external",
"source": "msgpack",
"arg-type-unix": "with",
"arg-type-win": "enable"
},
"mysqli": {
"type": "builtin",
"arg-type": "with",
Expand Down
10 changes: 10 additions & 0 deletions config/source.json
Original file line number Diff line number Diff line change
Expand Up @@ -514,6 +514,16 @@
"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": {
"type": "filelist",
"url": "https://ftp.gnu.org/pub/gnu/ncurses/",
Expand Down
7 changes: 7 additions & 0 deletions src/globals/ext-tests/msgpack.php
Original file line number Diff line number Diff line change
@@ -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']);
4 changes: 2 additions & 2 deletions src/globals/test-extensions.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@

// If you want to test your added extensions and libs, add below (comma separated, example `bcmath,openssl`).
$extensions = match (PHP_OS_FAMILY) {
'Linux', 'Darwin' => 'redis,igbinary',
'Windows' => 'redis,igbinary',
'Linux', 'Darwin' => 'redis,igbinary,msgpack',
'Windows' => 'redis,igbinary,msgpack',
};

// If you want to test lib-suggests feature with extension, add them below (comma separated, example `libwebp,libavif`).
Expand Down

0 comments on commit 2beecee

Please # to comment.