[DOC-CVS] [doc-en] master: Document deprecation of SOAP_FUNCTIONS_ALL in SoapServer::addFunction (#5108)
[email protected] (Louis-Arnaud via GitHub)
| Newsgroups | php.doc.cvs |
|---|---|
| Message-ID | <[email protected]> |
Author: Louis-Arnaud (lacatoire)
Committer: GitHub (web-flow)
Pusher: Girgias
Date: 2026-01-30T10:12:27Z
Commit: https://github.com/php/doc-en/commit/577239f64b3959c22d348a5f381eaf32fde996ed
Raw diff: https://github.com/php/doc-en/commit/577239f64b3959c22d348a5f381eaf32fde996ed.diff
Document deprecation of SOAP_FUNCTIONS_ALL in SoapServer::addFunction (#5108)
Changed paths:
M reference/soap/soapserver/addfunction.xml
Diff:
diff --git a/reference/soap/soapserver/addfunction.xml b/reference/soap/soapserver/addfunction.xml
index dfc5516de34b..11638f8b56e3 100644
--- a/reference/soap/soapserver/addfunction.xml
+++ b/reference/soap/soapserver/addfunction.xml
@@ -32,8 +32,14 @@
To export several functions, pass an array of function names.
</para>
<para>
- To export all the functions, pass a special constant <constant>SOAP_FUNCTIONS_ALL</constant>.
+ To export all the functions, pass an array of function names.
</para>
+ <simpara>
+ As of PHP 8.4.0, passing an <type>int</type> value (including
+ <constant>SOAP_FUNCTIONS_ALL</constant>) is deprecated.
+ Use <function>get_defined_functions</function> to retrieve all functions
+ and pass them as an array instead.
+ </simpara>
<note>
<para>
<parameter>functions</parameter> must receive all input arguments in the same
@@ -54,6 +60,29 @@
&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>
+ Passing an <type>int</type> to
+ <methodname>SoapServer::addFunction</methodname>,
+ including <constant>SOAP_FUNCTIONS_ALL</constant>, has been deprecated.
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ </refsect1>
<refsect1 role="examples">
&reftitle.examples;
@@ -78,7 +107,8 @@ function echoTwoStrings($inputString1, $inputString2)
}
$server->addFunction(array("echoString", "echoTwoStrings"));
-$server->addFunction(SOAP_FUNCTIONS_ALL);
+$functions = array_merge(...get_defined_functions());
+$server->addFunction($functions);
?>
]]>