Skip to content

Stdlib: SoapVar APACHE_MAP encodes as typed scalar — Zend to_xml_map item/key/value (ext/soap/php_encoding.c) #32222

Description

@PurHur

Category

stdlib · php-src-strict · child of #3724 · SOAP encoding batch (APACHE_MAP)

Problem

php-src to_xml_map() encodes APACHE_MAP as xsi:type="{apache-ns}Map" with <item><key/><value/></item> children and xmlns http://xml.apache.org/xml-soap. After SoapVar unwrap (#32190), VM still treats the assoc enc_value as a generic typed node (xsi:type="apache:Map") without Map items.

Repro (2026-08-18, php8.2-soap) Zend VM
SoapVar(['k'=>'v'], APACHE_MAP) encoded RPC xmlns:ns2="http://xml.apache.org/xml-soap" + xsi:type="ns2:Map" + <item><key xsi:type="xsd:string">k</key><value xsi:type="xsd:string">v</value></item> xsi:type="apache:Map" without item/key/value

php-src reference

PHP implementation target

Repro

./script/docker-exec.sh -- bash -lc 'apt-get update -qq; DEBIAN_FRONTEND=noninteractive apt-get install -y -qq php8.2-soap >/dev/null; php test/repro/issue_soapvar_apache_map.php; php bin/vm.php test/repro/issue_soapvar_apache_map.php'

Done when

  • Encoded request has apache Map xmlns + Map xsi:type
  • Assoc entries become <item><key/><value/></item> like Zend
  • Compliance .phpt guard
  • php-src-strict

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 machinebugSomething isn't workingimplementation-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