[DOC-CVS] [doc-en] master: ext/soap: document PHP 8.4 changes (#5735)
[email protected] (Louis-Arnaud via GitHub)
| Newsgroups | php.doc.cvs |
|---|---|
| Message-ID | <[email protected]> |
Author: Louis-Arnaud (lacatoire)
Committer: GitHub (web-flow)
Pusher: jordikroon
Date: 2026-08-13T19:08:34+02:00
Commit: https://github.com/php/doc-en/commit/d20d66d9c76ff98dceb853aeb86794fe9d657669
Raw diff: https://github.com/php/doc-en/commit/d20d66d9c76ff98dceb853aeb86794fe9d657669.diff
ext/soap: document PHP 8.4 changes (#5735)
- SoapVar: a DateTimeInterface value of an xsd:dateTime (or similar) element
is now serialized to its ISO 8601 form instead of an empty string.
- SoapServer::setPersistence: document shared session module support.
- SoapClient/SoapServer constructors: document clark notation for namespaces
in the class map.
- SoapClient::$typemap is now an array instead of a resource (BC break).
Changed paths:
M reference/soap/soapclient.xml
M reference/soap/soapclient/construct.xml
M reference/soap/soapserver/construct.xml
M reference/soap/soapserver/setpersistence.xml
M reference/soap/soapvar/construct.xml
Diff:
diff --git a/reference/soap/soapclient.xml b/reference/soap/soapclient.xml
index 335535c97d0b..629a870a1358 100644
--- a/reference/soap/soapclient.xml
+++ b/reference/soap/soapclient.xml
@@ -72,7 +72,7 @@
</fieldsynopsis>
<fieldsynopsis>
<modifier>private</modifier>
- <type class="union"><type>resource</type><type>null</type></type>
+ <type class="union"><type>array</type><type>null</type></type>
<varname linkend="soapclient.props.typemap">typemap</varname>
<initializer>null</initializer>
</fieldsynopsis>
@@ -487,8 +487,14 @@
<varlistentry xml:id="soapclient.props.typemap">
<term><varname>typemap</varname></term>
<listitem>
- <para>
- </para>
+ <simpara>
+ An array of type mappings used for custom XML-to-PHP type conversions,
+ or &null; if no type mappings are configured.
+ As of PHP 8.4.0, this property is of type <type>array</type>;
+ previously it was of type <type>resource</type>.
+ Code using <function>is_resource</function> to check this property
+ must be updated accordingly.
+ </simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="soapclient.props.uri">
diff --git a/reference/soap/soapclient/construct.xml b/reference/soap/soapclient/construct.xml
index 7159111fb0f3..6b03cbd5871c 100644
--- a/reference/soap/soapclient/construct.xml
+++ b/reference/soap/soapclient/construct.xml
@@ -368,6 +368,13 @@
<link linkend="object.get">__get()</link> methods for individual
properties will be.
</para>
+ <simpara>
+ As of PHP 8.4.0, keys may also be specified using Clark notation,
+ in the form <literal>{namespace}type</literal>, to map a type from a
+ specific XML namespace, for example
+ <literal>'{http://example.com}foo'</literal>. This is useful when
+ the same type name is defined in more than one namespace.
+ </simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="soapclient.construct.options.typemap">
diff --git a/reference/soap/soapserver/construct.xml b/reference/soap/soapserver/construct.xml
index 48d799889a1d..0884ea9ae02f 100644
--- a/reference/soap/soapserver/construct.xml
+++ b/reference/soap/soapserver/construct.xml
@@ -41,11 +41,15 @@
internal character encoding (<literal>encoding</literal>),
and actor URI (<literal>actor</literal>).
</para>
- <para>
+ <simpara>
The <literal>classmap</literal> option can be used to map some WSDL
types to PHP classes. This option must be an array with WSDL types
as keys and names of PHP classes as values.
- </para>
+ As of PHP 8.4.0, keys may also be specified using Clark notation,
+ in the form <literal>{namespace}type</literal>, to map a type from a
+ specific XML namespace, for example
+ <literal>'{http://example.com}foo'</literal>.
+ </simpara>
<para>
The <literal>typemap</literal> option is an array of type mappings.
Type mapping is an array with keys <literal>type_name</literal>,
diff --git a/reference/soap/soapserver/setpersistence.xml b/reference/soap/soapserver/setpersistence.xml
index 0b257ccd4dba..14ea81b58430 100644
--- a/reference/soap/soapserver/setpersistence.xml
+++ b/reference/soap/soapserver/setpersistence.xml
@@ -64,7 +64,33 @@
&return.void;
</para>
</refsect1>
-
+
+ <refsect1 role="changelog">
+ &reftitle.changelog;
+ <informaltable>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>&Version;</entry>
+ <entry>&Description;</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>8.4.0</entry>
+ <entry>
+ <constant>SOAP_PERSISTENCE_SESSION</constant> now works when the session
+ extension is built as a shared module; previously it failed silently.
+ <methodname>SoapServer::setPersistence</methodname> now also throws an
+ <exceptionname>Error</exceptionname> when <constant>SOAP_PERSISTENCE_SESSION</constant>
+ is requested while the session extension is not available.
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ </refsect1>
+
<refsect1 role="examples">
&reftitle.examples;
<para>
diff --git a/reference/soap/soapvar/construct.xml b/reference/soap/soapvar/construct.xml
index e021bcee7355..3ab6989a1e28 100644
--- a/reference/soap/soapvar/construct.xml
+++ b/reference/soap/soapvar/construct.xml
@@ -89,6 +89,15 @@
</row>
</thead>
<tbody>
+ <row>
+ <entry>8.4.0</entry>
+ <entry>
+ An instance of <classname>DateTimeInterface</classname> used as the
+ value for an <literal>xsd:dateTime</literal> element, or a similar date
+ and time type, is now serialized to its ISO 8601 representation, instead
+ of being serialized as an empty string.
+ </entry>
+ </row>
<row>
<entry>8.0.3</entry>
<entry>