Skip to content

Bootstrap: ext/msgpack module skeleton — register msgpack_pack/unpack before handlers (phase 0 of #6551) #7032

Description

@PurHur

Category

bootstrap | stdlib

Problem

#6551 tracks full MessagePack encode/decode. Before VM handlers land, bootstrap/self-host needs an ext/msgpack/Module.php skeleton (mirror #6937 hash, #6940 tokenizer, #6999 curl):

  • function_exists('msgpack_pack') / msgpack_unpack → false today (verified 2026-06-06)
  • Runtime::load() must register the module name so extension_loaded('msgpack') and inventory probes match php-src layout

php-src reference

Repro (today)

./script/docker-exec.sh -- bash -lc 'source script/php-env.sh && php bin/vm.php -r "
var_export(function_exists(\"msgpack_pack\"));
echo PHP_EOL;
var_export(function_exists(\"msgpack_unpack\"));
echo PHP_EOL;
var_export(extension_loaded(\"msgpack\"));
echo PHP_EOL;
"'
# bool(false) bool(false) bool(false)

Scope (phase 0 only)

Path Work
ext/msgpack/Module.php New module; register function names + extension_loaded metadata
ext/msgpack/msgpack_pack.php, msgpack_unpack.php Stub call() → clear Error/LogicException with php-src-shaped message until #6551
lib/Runtime.php or bootstrap loader load(new ext\msgpack\Module()) on spine
Inventory php script/bootstrap-inventory.php --check row for ext/msgpack
Tests test/unit/MsgpackModuleSkeletonTest.php — registration only

No C stubs in runtime/ — PHP module only.

Done when

Verification

./script/docker-exec.sh -- bash -lc 'source script/php-env.sh && vendor/bin/phpunit --filter MsgpackModuleSkeleton'
php script/bootstrap-inventory.php --check

Related

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:vmVirtual machineenhancementNew feature or requestimplementation-readySpec complete: repro, php-src ref, done-when — safe for workers to claimphase-0:FoundationPhase 0 – foundation & DevExphase-4:stdlibPhase 4 – stdlib for web apps

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions