+XML-RPC for PHP version 4.4.3 - unreleased
+
+* fixed: compatibility with PHP 8.0 (fixes to the debugger, to the server's 'system.methodHelp' method and to the
+ PhpXmlRpc\Wrapper class)
+
+* improvements to the test stack: it is now possible to run it via Docker besides Travis; avoid using _any_ external
+ server when running tests
+
+
XML-RPC for PHP version 4.4.2 - 2020/3/4
* fixed: `client->setCookie()` bug: cookie values that contain spaces are now properly encoded in a way that gets them
Documentation
-------------
-*NB: the user manual has not been updated yet with all the changes made in version 4. Please consider it unreliable!*
-
-*You are encouraged to look instead the code examples found in the demo/ directory*
+See the documentation page at [gggeek.github.io/phpxmlrpc](https://gggeek.github.io/phpxmlrpc) for a list of the
+library main features and all project related information.
The user manual can be found in the doc/manual directory, in Asciidoc format: [phpxmlrpc_manual.adoc](doc/manual/phpxmlrpc_manual.adoc)
-Release tarballs also contain the HTML and PDF versions, as well as an automatically generated API documentation.
+Release tarballs also contain HTML and PDF versions of the manual, as well as an automatically generated API documentation.
+
+*NB: the user manual has not been updated yet with all the changes made in version 4. Please consider it unreliable!*
+
+*You are encouraged to look instead the code examples found in the demo/ directory*
Upgrading
---------
case 'wrap':
$msg[0] = new $requestClass('system.methodHelp', array(), $id);
$msg[0]->addparam(new PhpXmlRpc\Value($method));
- $msg[1] = new $requestClass('system.methodSignature', array(), $id + 1);
+ $msg[1] = new $requestClass('system.methodSignature', array(), (int)$id + 1);
$msg[1]->addparam(new PhpXmlRpc\Value($method));
$actionname = 'Description of method "' . $method . '"';
break;
$encoder = new PhpXmlRpc\Encoder();
$msig = $encoder->decode($r2);
$msig = $msig[$methodsig];
- $proto = $protocol == 2 ? 'https' : $protocol == 1 ? 'http11' : '';
+ $proto = $protocol == 2 ? 'https' : ( $protocol == 1 ? 'http11' : '' );
if ($proxy == '' && $username == '' && !$requestcompression && !$responsecompression &&
$clientcookies == ''
) {
<h3>Changelog</h3>
<ul>
+ <li>2020-12-11: fix problems with running the debugger on php 8</li>
<li>2015-05-30: fix problems with generating method payloads for NIL and Undefined parameters</li>
<li>2015-04-19: fix problems with LATIN-1 characters in payload</li>
<li>2007-02-20: add visual editor for method payload; allow strings, bools as jsonrpc msg id</li>
*/
// work around magic quotes
-if (get_magic_quotes_gpc()) {
+if (function_exists('get_magic_quotes_gpc') && get_magic_quotes_gpc()) {
function stripslashes_deep($value)
{
$value = is_array($value) ?
public static $xmlrpc_internalencoding = "UTF-8";
public static $xmlrpcName = "XML-RPC for PHP";
- public static $xmlrpcVersion = "4.4.2";
+ public static $xmlrpcVersion = "4.4.3-dev";
// let user errors start at 800
public static $xmlrpcerruser = 800;
}
}
throw $e;
- break;
case 1:
$r = new Response(0, $e->getCode(), $e->getMessage());
break;
}
if (isset($dmap[$methName])) {
if (isset($dmap[$methName]['docstring'])) {
- $r = new Response(new Value($dmap[$methName]['docstring']), 'string');
+ $r = new Response(new Value($dmap[$methName]['docstring'], 'string'));
} else {
$r = new Response(new Value('', 'string'));
}
* - bool debug set it to 1 or 2 to see debug results of querying server for method synopsis
* - int simple_client_copy set it to 1 to have a lightweight copy of the $client object made in the generated code (only used when return_source = true)
*
- * @return \closure|array|false false on failure, closure by default and array for return_source = true
+ * @return \closure|string[]|false false on failure, closure by default and array for return_source = true
*/
public function wrapXmlrpcMethod($client, $methodName, $extraOptions = array())
{
* @param string $newFuncName
* @param array $mSig
* @param string $mDesc
- * @return array
+ * @return string[] keys: source, docstring
*/
public function buildWrapMethodSource($client, $methodName, array $extraOptions, $newFuncName, $mSig, $mDesc='')
{
// (this provides for future expansion or subclassing of client obj)
if ($verbatimClientCopy) {
foreach ($client as $fld => $val) {
- if ($fld != 'debug' && $fld != 'return_type') {
+ /// @todo in php 8.0, curl handles became objects, but they have no __set_state, thus var_export will
+ /// fail for xmlrpc_curl_handle. So we disabled copying it.
+ /// We should examine in depth if this change can have side effects - at first sight if the
+ /// client's curl handle is not set, all curl options are (re)set on each http call, so there
+ /// should be no loss of state...
+ if ($fld != 'debug' && $fld != 'return_type' && $fld != 'xmlrpc_curl_handle') {
$val = var_export($val, true);
$code .= "\$client->$fld = $val;\n";
}