Skip to content

Regression: DOM soft-null deprecation cites $value — Zend stub names (qualifiedName/filename/feature/…) (ext/dom) #31824

Description

@PurHur

Category

Regression: · php-src-strict · ext/dom soft-null E_DEPRECATED parameter names

Problem

Several DOM* / DOMNamedNodeMap / DOMImplementation string args soft-deprecate null→string via DomClassMethod::stringArg() / JIT VmDomJitDispatch::stringArg() with the default $paramName = 'value'. Zend/php-src cites the stub parameter names ($qualifiedName, $filename, $feature, $version, $localName, $data, …).

Probed 2026-08-17 — host Zend PHP 8.2.32 vs php bin/vm.php.

Repro Zend 8.2+ VM (2026-08-17)
$attrs->getNamedItem(null) Deprecated $qualifiedName Deprecated $value
$doc->load(null) / loadHTMLFile(null) / saveHTMLFile(null) Deprecated $filename Deprecated $value
$node->isSupported(null, null) Deprecated $feature + $version Deprecated $value + $value
(new DOMImplementation)->hasFeature(null, null) Deprecated $feature + $version Deprecated $value + $value
$el->getAttributeNode(null) Deprecated $qualifiedName Deprecated $value
$el->getAttributeNodeNS(null, null) Deprecated $localName (#2) Deprecated $value (#2)
$attrs->getNamedItemNS(null, null) Deprecated $localName (#2) Deprecated $value (#2)
$frag->appendXML(null) Deprecated $data Deprecated $value
$impl->createDocument(null, null) Deprecated $qualifiedName (#2) Deprecated $value (#2)

php-src reference

PHP implementation target

  • ext/dom/DomClassMethod.php callers — pass Zend stub $paramName into stringArg() (stop relying on default 'value')
  • ext/dom/VmDomJitDispatch.php — mirror names on JIT/AOT stringArg sites
  • No new runtime/*.c

Repro

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

Done when

  • Soft-null deprecation messages cite Zend stub parameter names for the methods in the table
  • VM + JIT paths agree; smallest compliance/repro guard
  • php-src-strict; no php-compiler-strict shortcut

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