Skip to content

Commit 2beecee

Browse files
authored
Add extension msgpack support (#543)
1 parent ad098d0 commit 2beecee

File tree

4 files changed

+28
-2
lines changed

4 files changed

+28
-2
lines changed

config/ext.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -360,6 +360,15 @@
360360
"zlib"
361361
]
362362
},
363+
"msgpack": {
364+
"support": {
365+
"BSD": "wip"
366+
},
367+
"type": "external",
368+
"source": "msgpack",
369+
"arg-type-unix": "with",
370+
"arg-type-win": "enable"
371+
},
363372
"mysqli": {
364373
"type": "builtin",
365374
"arg-type": "with",

config/source.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -514,6 +514,16 @@
514514
"path": "LICENSE"
515515
}
516516
},
517+
"msgpack": {
518+
"type": "url",
519+
"url": "https://pecl.php.net/get/msgpack",
520+
"path": "php-src/ext/msgpack",
521+
"filename": "msgpack.tgz",
522+
"license": {
523+
"type": "file",
524+
"path": "LICENSE"
525+
}
526+
},
517527
"ncurses": {
518528
"type": "filelist",
519529
"url": "https://ftp.gnu.org/pub/gnu/ncurses/",

src/globals/ext-tests/msgpack.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
assert(function_exists('msgpack_pack'));
6+
assert(function_exists('msgpack_unpack'));
7+
assert(msgpack_unpack(msgpack_pack(['foo', 'bar'])) === ['foo', 'bar']);

src/globals/test-extensions.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919

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

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

0 commit comments

Comments
 (0)