Skip to content

Regression: extension_loaded('soap') + SoapClient/SoapServer/SoapFault class_exists on default profile — Zend false (ext/soap) #22859

Description

@PurHur

Category

Stdlib · php-src-strict · extension advertisement (pairs #3724 SoapClient subset; same shape as #22790 / #22791)

Problem

On a host Zend build without ext/soap, extension_loaded('soap') and class_exists('SoapClient'|'SoapServer'|'SoapFault', false) are all false. The VM advertises soap as loaded and materializes all three classes on the default (8.2 reference) profile.

This is distinct from #3724 (implement SoapClient behavior). Workers should gate advertisement / class registration to match Zend’s loaded-module set first; subset API work stays on #3724.

Probed 2026-07-24 (host PHP 8.2.32, soap absent).

Repro Zend 8.2+ (no soap) VM (2026-07-24)
extension_loaded('soap') false true
class_exists('SoapClient', false) false true
class_exists('SoapServer', false) false true
class_exists('SoapFault', false) false true

php-src reference

PHP implementation target

  • ext/soap module registration / CompilerVersion / extension policy: do not advertise soap or register SoapClient/SoapServer/SoapFault when the reference profile’s Zend build would not load soap
  • Keep real SoapClient semantics work on Stdlib: ext/soap — SoapClient subset (ext/soap parity) #3724 once advertisement matches
  • PHP in ext/soap + lib/; no new C runtime branches

Repro

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

Done when

  • On default/reference profile matching a Zend build without soap: extension_loaded('soap') false and the three Soap* classes are not class_exists(..., false)
  • When soap is intentionally enabled for a profile/build, advertisement and classes return true together
  • Compliance .phpt under test/compliance/cases/
  • php-src-strict; no php-compiler-strict shortcut

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