Version 0.32.0
Upgrade to veewee/xml v4 and PHP 8.4+
This release migrates the package to PHP 8.4's spec-compliant DOM API via veewee/xml ^4.10.
Requirements
- PHP 8.4+ (dropped 8.3 support)
veewee/xml^4.10- Standalone PSL packages ^6.1 (replaces the monolith
php-standard-library/php-standard-library)
Breaking Changes
Element::fromDOMElement()andElement::element()now accept/returnDom\Elementinstead ofDOMElementXsiTypeDetector::detectXsdTypeFromXmlElement()anddetectEncoderFromXmlElement()acceptDom\Elementinstead ofDOMElementElementValueReadermethods acceptDom\Elementinstead ofDOMElement- SOAP 1.2 fault detail serialization may produce namespace declarations in a different order (alphabetical, per the new DOM spec)
Dependency Bumps
| Package | From | To |
|---|---|---|
php-soap/engine |
^2.19 | ^2.20 |
php-soap/wsdl |
^1.18 | ^1.19 |
php-soap/xml |
^1.9 | ^1.10 |
php-soap/wsdl-reader |
^0.31 | ^0.32 |
php-soap/psr18-transport |
^1.8 | ^2.0 |
php-soap/engine-integration-tests |
^1.10 | ^1.12 |
DOM Migration Details
- All legacy
DOMDocument,DOMElement,DOMNode,DOMAttrtype hints replaced withDom\namespace equivalents - Deprecated
Document::configure(loader(...))replaced withDocument::fromLoader() getAttribute()/getAttributeNS()now returnnullinstead of''for missing attributes (handled throughout)textContentis now?string(null-guarded in fault encoders)ownerDocumentaccess usesassert_document()(returns?Dom\Document, not?Dom\XMLDocument)- DOM stubs added to
psalm.xmlfor static analysis support
Performance
Encoding (PHP values to XML) is 12-16% faster, and memory usage dropped ~7% across the board.
Decoding (XML to PHP values) shows a small regression in SOAP encoded mode:
| Benchmark | Change |
|---|---|
| Literal decode | unchanged (+0.4%) |
| Encoded decode | +7-9% |
The encoded decode regression is caused by PHP 8.4's new Dom\ implementation being marginally slower per-operation on XPath queries (+22%), node iteration (+11%), and XML parsing (+2%). These small differences compound through the encoded decode path, which performs ~2x more DOM interactions than literal mode (xsi:type attribute reads, namespace resolution on every element). This is a PHP engine characteristic, not something fixable at the library level, and may improve in future PHP releases. (/cc @ndossche)
In real-world usage, the encoded decode overhead translates to roughly 15-20 microseconds per decoded message, which is negligible compared to network latency.
What's Changed
Full Changelog: 0.31.0...0.32.0