Skip to content

Bootstrap: ext/zip/ module skeleton — register ZipArchive for self-host (M4) #5869

Description

@PurHur

Category

bootstrap · stdlib

Problem

Full ZipArchive parity is tracked in #3337, but self-host/bootstrap inventory needs an ext/zip/ module skeleton (like #5839 ext/filter/ and #5695 mbstring) so workers can register classes/functions without bolting everything into ext/standard/Module.php.

Today: class_exists('ZipArchive') is false; no ext/zip/ tree.

php-src reference

Repro (today)

./script/docker-exec.sh -- bash -lc 'source script/php-env.sh
php8.2 -r "var_export(class_exists(\"ZipArchive\")); echo PHP_EOL;"
php bin/vm.php -r "var_export(class_exists(\"ZipArchive\")); echo PHP_EOL;"
ls ext/zip 2>/dev/null || echo "no ext/zip/"
'
Check Zend VM today
class_exists('ZipArchive') true (ext/zip enabled) false
ext/zip/Module.php n/a missing

Scope (this repo)

Path Work
ext/zip/Module.php New module; register ZipArchive stub class + method placeholders delegating to phase-2 impl
ext/zip/BuiltinClasses.php ZipArchive VM builtin skeleton
Module loader Wire ext/zip beside ext/intl / ext/filter
script/bootstrap-inventory.php Include ext/zip/* paths
Docs Link implementation body to #3337 (open/add/extract semantics)

v1 skeleton: class_exists true; ZipArchive::open() may LogicException “not implemented” until #3337 — same pattern as filter skeleton #5839.

Implement registration in PHP; libzip calls via thin FFI only when #3337 lands — no permanent logic in runtime/*.c.

Done when

  • ext/zip/Module.php loads without duplicate-registration fatal
  • class_exists('ZipArchive') true on VM
  • php script/bootstrap-inventory.php --check lists ext/zip/
  • Existing CI unchanged (stubs documented in matrix)

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