PackageTrack
Sign in Get early access

php-soap/encoding

SOAP encoding and decoding package

0.34.0 498K downloads/mo #3989 most downloaded on Packagist php-soap/encoding

What this package is like to depend on

Last release 2 months ago

27 May 2026

Release timing varies

gaps range from 9 days to 5 months

Some releases are documented

notes for 10 of 38 stable releases

Nothing withdrawn

no release was ever pulled

2 years old

38 releases · first in 2024

14 releases in the last 12 months

see the full history below

Release timeline

38 releases · Jun 2024 to May 2026
2025 2026
Release Pre-release

Releases

latest 38
  1. 0.34.0 27 May 2026
    Release notes

    What's Changed

    • Migrate to STAB optics (Iso<S,T,A,B> / Lens<S,T,A,B>) by @veewee in #64

    Warning

    Custom encoders need updating. Reflecta's optics moved from 2 type parameters to 4, the STAB form: Iso<S, T, A, B> and Lens<S, T, A, B>. If you wrote your own XmlEncoder, SoapMethodEncoder, or anything implementing the Provides*Lens or DecoratingEncoder features, widen your generic annotations from 2 to 4 parameters.

    S and A keep their old meaning (the whole, and the focus). T and B are the write-side counterparts, used when a write changes the type. If yours never does, just repeat them: XmlEncoder<Data, Data, Xml, Xml>.

    Nothing changes at runtime. Method signatures are the same, so any code without explicit Psalm/PHPDoc annotations keeps working as is. The Reflecta 1.0.0 upgrade guide walks through the rest.

    Full Changelog: 0.33.0...0.34.0

    Open source →
  2. 0.33.0 03 Apr 2026
    Release notes

    What's Changed

    New Contributors

    Full Changelog: 0.32.0...0.33.0

    Open source →
  3. 0.32.0 27 Mar 2026
    Release notes

    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() and Element::element() now accept/return Dom\Element instead of DOMElement
    • XsiTypeDetector::detectXsdTypeFromXmlElement() and detectEncoderFromXmlElement() accept Dom\Element instead of DOMElement
    • ElementValueReader methods accept Dom\Element instead of DOMElement
    • 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, DOMAttr type hints replaced with Dom\ namespace equivalents
    • Deprecated Document::configure(loader(...)) replaced with Document::fromLoader()
    • getAttribute() / getAttributeNS() now return null instead of '' for missing attributes (handled throughout)
    • textContent is now ?string (null-guarded in fault encoders)
    • ownerDocument access uses assert_document() (returns ?Dom\Document, not ?Dom\XMLDocument)
    • DOM stubs added to psalm.xml for 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

    • Migrate to veewee/xml v4 and PHP 8.4+ by @veewee in #58

    Full Changelog: 0.31.0...0.32.0

    Open source →
  4. 0.31.1 21 Apr 2026
    Release notes

    What's Changed

    • Backport: Fix ObjectEncoder dropping attributes with falsy values by @veewee in #62

    Full Changelog: 0.31.0...0.31.1

    Open source →
  5. 0.31.0 26 Mar 2026
    Release notes

    Performance Release

    This release focuses entirely on encoding/decoding performance. No breaking changes.

    What changed

    A series of targeted caching improvements were introduced across the encoder pipeline. Each fix eliminates redundant object construction on repeated calls to iso() within a single request.

    Merged PRs

    PR Change
    #52 Cache inner Iso in XsiTypeEncoder to avoid redundant iso() calls
    #53 Cache type Iso in ElementEncoder; refactor ElementValueBuilder and ElementValueReader
    #55 Cache type Iso in AttributeValueEncoder
    #56 Cache FixedIsoEncoder per xsi:type in XsiTypeDetector; introduce ScopedCache; refactor EncoderDetector
    #57 Cache ObjectAccess::forContext() by type+namespace+bindingUse (largest single win)

    Bumping veewee/reflecta to ^0.17 also contributes a small improvement via a properties_set clone-once optimization (reflecta#26).

    Benchmark results

    Benchmarks run with phpbench on PHP 8.4, using a complex SOAP type with nested objects. WSDL parsing is excluded from measurements (@BeforeMethods). The baseline is the commit where benchmarks were introduced (before any optimizations).

    Encoding

    Benchmark Baseline Optimized Improvement
    Literal — 1 item 126.2 μs 91.1 μs -28%
    Literal — 500 items 62.3 ms 44.7 ms -28%
    Encoded — 1 item 174.4 μs 140.0 μs -20%
    Encoded — 500 items 86.6 ms 69.1 ms -20%

    Decoding

    Benchmark Baseline Optimized Improvement
    Literal — 1 item 178.7 μs 132.4 μs -26%
    Literal — 500 items 90.0 ms 68.5 ms -24%
    Encoded — 1 item 250.5 μs 167.6 μs -33%
    Encoded — 500 items 129.5 ms 83.0 ms -36%

    Comparison with ext-soap

    For context, ext-soap (C extension) measured on the same machine:

    Operation ext-soap php-soap/encoding Ratio
    Encode literal — 1 item 7.6 μs 91.1 μs ~12x slower
    Encode encoded — 1 item 12.5 μs 140.0 μs ~11x slower
    Decode literal — 1 item 11.3 μs 132.4 μs ~12x slower
    Decode encoded — 1 item 16.3 μs 167.6 μs ~10x slower

    The gap vs ext-soap is expected: php-soap/encoding operates at the PHP level and provides full type-safety and WSDL-driven encoding as a pure PHP implementation.

    Upgrade notes

    • Minimum veewee/reflecta version bumped to ^0.17.
    • No changes to public API. Drop-in upgrade.
    • The new ScopedCache class (Soap\Encoding\Cache\ScopedCache) is @internal.

    What's Changed

    • Add phpbench benchmarks with CI regression detection by @veewee in #51
    • Cache inner iso in XsiTypeEncoder by @veewee in #52
    • Cache type iso in ElementEncoder, refactor value builder/reader by @veewee in #53
    • Cache type iso in AttributeValueEncoder by @veewee in #55
    • Cache xsi:type encoder detection in XsiTypeDetector by @veewee in #56
    • Cache ObjectAccess::forContext() using ScopedCache by @veewee in #57

    Full Changelog: 0.30.0...0.31.0

    Open source →
  6. 0.30.0 25 Mar 2026
    Release notes

    What's Changed

    • Fix duplicate xmlns attributes on qualified elements with xsi:type by @veewee in #50

    Full Changelog: 0.29.0...0.30.0

    Open source →
  7. 0.29.0 24 Mar 2026
    Release notes

    What's Changed

    • Fix xsi:type namespace resolution for server-side prefixes by @veewee in #49
    • Fix base64Binary decoding for unpadded and whitespace-containing input by @veewee in #47

    Full Changelog: 0.28.0...0.29.0

    Open source →
  8. 0.28.0 19 Mar 2026
    Release notes

    What's Changed

    • Replace azjezz/psl with php-standard-library/php-standard-library by @veewee in #45

    Full Changelog: 0.27.0...0.28.0

    Open source →
  9. 0.27.0 11 Mar 2026
    Release notes

    What's Changed

    • feat: Update azjezz/psl requirement to include version 5.0 by @EJTJ3 in #44

    New Contributors

    • @EJTJ3 made their first contribution in #44

    Full Changelog: 0.26.0...0.27.0

    Open source →
  10. 0.26.0 17 Dec 2025
    Release notes

    What's Changed

    • Allow configuration of libxml options for decoding XML by @veewee in #43

    Full Changelog: 0.25.0...0.26.0

    Open source →
  11. 0.25.0 05 Dec 2025

    Nothing published for this version

  12. 0.24.0 25 Nov 2025

    Nothing published for this version

  13. 0.23.0 20 Oct 2025

    Nothing published for this version

  14. 0.22.0 26 Sep 2025

    Nothing published for this version

  15. 0.21.0 17 Jul 2025

    Nothing published for this version

  16. 0.20.0 12 Feb 2025

    Nothing published for this version

  17. 0.19.0 07 Feb 2025

    Nothing published for this version

  18. 0.18.0 12 Jan 2025

    Nothing published for this version

  19. 0.17.0 10 Jan 2025

    Nothing published for this version

  20. 0.16.0 03 Jan 2025

    Nothing published for this version

  21. 0.15.1 20 Dec 2024

    Nothing published for this version

  22. 0.15.0 20 Dec 2024

    Nothing published for this version

  23. 0.14.0 19 Dec 2024

    Nothing published for this version

  24. 0.13.0 25 Oct 2024

    Nothing published for this version

  25. 0.12.0 30 Sep 2024

    Nothing published for this version

  26. 0.11.0 03 Sep 2024

    Nothing published for this version

  27. 0.10.0 30 Aug 2024

    Nothing published for this version

  28. 0.9.1 01 Aug 2024

    Nothing published for this version

  29. 0.9.0 01 Aug 2024

    Nothing published for this version

  30. 0.8.0 24 Jul 2024

    Nothing published for this version

  31. 0.7.0 20 Jul 2024

    Nothing published for this version

  32. 0.6.0 14 Jun 2024

    Nothing published for this version

  33. 0.5.0 13 Jun 2024

    Nothing published for this version

  34. 0.4.1 12 Jun 2024

    Nothing published for this version

  35. 0.4.0 11 Jun 2024

    Nothing published for this version

  36. 0.3.0 11 Jun 2024

    Nothing published for this version

  37. 0.2.0 10 Jun 2024

    Nothing published for this version

  38. 0.1.0 10 Jun 2024

    Nothing published for this version

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive