Skip to content

Stdlib: ldap_add()/ldap_delete()/ldap_modify()/ldap_modify_batch() missing after mod_* (ext/ldap/ldap.stub.php) #22196

Description

@PurHur

Category

stdlib · php-src-strict · ldap directory write API

Problem

Partial modify helpers ldap_mod_add / ldap_mod_del / ldap_mod_replace are registered, but the primary write APIs and batch/ext variants apps need for CRUD are not. Related open: #22177 compare/parse/attrs, #22164 bind_ext, #22168 search_ext, #22176 sasl_bind, #22181 references.

Function Zend / php-src VM (2026-07-22)
ldap_mod_add / ldap_mod_del / ldap_mod_replace yes yes
ldap_add yes no
ldap_delete yes no
ldap_modify yes no
ldap_modify_batch yes no
ldap_add_ext / ldap_delete_ext / ldap_rename_ext yes no
ldap_mod_add_ext / ldap_mod_del_ext / ldap_mod_replace_ext yes no

php-src reference

PHP implementation target

  • ext/ldap/ — register beside existing ldap_modify_builtins.php / VmLdapModify.php; reuse native FFI already used for mod_add/del/replace
  • ldap_modify is alias semantics to full replace of attributes (Zend); ldap_modify_batch takes structured op list
  • PHP-in-PHP over existing trampoline; no new C logic

Repro

./script/docker-exec.sh -- bash -lc 'php bin/vm.php test/repro/maintainer_gap_ldap_add_delete_modify_missing.php'

Observed VM (2026-07-22):

ldap_connect=yes
ldap_mod_add=yes
ldap_mod_del=yes
ldap_mod_replace=yes
ldap_add=NO
ldap_delete=NO
ldap_modify=NO
ldap_modify_batch=NO
ldap_add_ext=NO
ldap_delete_ext=NO
ldap_rename_ext=NO
ldap_mod_add_ext=NO
ldap_mod_del_ext=NO
ldap_mod_replace_ext=NO

Done when

  • All listed functions advertised + callable with php-src arity/types
  • Live LDAP (or skip-if): add/delete/modify/modify_batch (+ ext variants returning LDAP\Result where applicable) match Zend shapes
  • Compliance .phpt under test/compliance/cases/ext/ldap/
  • php-src-strict; no new runtime/*.c logic

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