Skip to content

Stdlib: imap_delete/undelete/expunge + ping/check/status missing when IMAP advertised (ext/imap/php_imap.stub.php) #27783

Description

@PurHur

Category

enhancement · php-src-strict · IMAP surface · pillar 4

Problem

IMAP is advertised (extension_loaded(\"imap\"), imap_open/imap_close/imap_num_msg present), but core mailbox/message lifecycle APIs are missing: imap_delete, imap_undelete, imap_expunge, imap_ping, imap_check, imap_status.

Verified 2026-08-05 on tip 724a117bf. Sibling IMAP gaps already tracked: #27765 compose, #27764 mutf7, #27681 utf7, #27680 timeout, #27674 imap_is_open, #27683 MIME codecs.

Repro php-src stub (8.3) VM (IMAP on)
function_exists(\"imap_delete\") true false
function_exists(\"imap_undelete\") true false
function_exists(\"imap_expunge\") true false
function_exists(\"imap_ping\") true false
function_exists(\"imap_check\") true false
function_exists(\"imap_status\") true false

php-src reference

PHP implementation target

  • ext/imap/ PHP helpers on VmImapConnection / mailbox engine (mark deleted, expunge, NOOP ping, check/status status objects)
  • Register in ext/imap/Module.php; Reflection parity with stubs
  • PHP-in-PHP; no new C runtime

Repro

./script/docker-exec.sh -- bash -lc '
cat > /tmp/imap_lifecycle.php <<'"'"'PHP'"'"'
<?php
echo "ext=", extension_loaded("imap") ? "Y" : "N", "\n";
foreach (["imap_delete","imap_undelete","imap_expunge","imap_ping","imap_check","imap_status"] as $f) {
  echo $f, "=", function_exists($f) ? "Y" : "N", "\n";
}
PHP
PHP_COMPILER_PROFILE=8.4 php bin/vm.php /tmp/imap_lifecycle.php
'

Done when

  • All six function_exists true when IMAP advertised
  • Minimal in-memory / mock-mbox behavior documented; Reflection matches stubs
  • VM (+ JIT if in scope); php-src-strict

Gate context (2026-08-05)

  • user_release_ready: no — helper-runtime-prelink + north-star5-fast red; inventory OK

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-4:stdlibPhase 4 – stdlib for web appsstdlib

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions