Skip to content

Stdlib: msgpack_pack/msgpack_unpack PHP implementation (#6551) - #17982

Merged
PurHur merged 1 commit into
masterfrom
agent/issue-6551-msgpack
Jul 11, 2026
Merged

PurHur merged 1 commit into
masterfrom
agent/issue-6551-msgpack

Conversation

@PurHur

@PurHur PurHur commented Jul 11, 2026

Copy link
Copy Markdown
Owner

Summary

Implements ext/msgpack msgpack_pack() / msgpack_unpack() as pure PHP (php-src ext/msgpack/msgpack.c reference). Replaces the phantom module stub that kept function_exists('msgpack_*') false.

  • ext/msgpack/VmMsgpack.php — MessagePack encode/decode for null/bool/int/float/string/array/map
  • Register msgpack_pack / msgpack_unpack on the msgpack extension module
  • Compliance + unit guards; maintainer repro updated from phantom-false to round-trip ok

Verification

./script/docker-exec.sh -- bash -lc 'source script/php-env.sh
php bin/vm.php test/repro-maintainer/parity_msgpack_roundtrip.php
# ok
php bin/vm.php test/repro/maintainer_gap_msgpack_phantom_registration.php
# ok
vendor/bin/phpunit test/unit/MsgpackModuleTest.php --no-configuration
# OK (2 tests, 4 assertions)
php script/bootstrap-inventory.php --check
# OK 4482/4482
'

Closes #6551

Made with Cursor

Register ext/msgpack with a pure-PHP MessagePack codec for scalar and
array round-trips; replace the phantom module stub and add compliance guards.

Co-authored-by: Cursor <cursoragent@cursor.com>
@PurHur
PurHur merged commit fa047d2 into master Jul 11, 2026
1 check failed
@PurHur
PurHur deleted the agent/issue-6551-msgpack branch July 11, 2026 14:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Stdlib: ext/msgpack — msgpack_pack()/msgpack_unpack() API missing (ext/msgpack)

1 participant