Open HMAZonderland opened 10 years ago
Hi
the lib having been available for such a long time, it is quite stable by now, and quite feature-complete, if you ask me. But of course I am open to requests and suggestions.
If you take a look at http://gggeek.github.io/phpxmlrpc/, there is a "roadmap" section. Tbh most of the ideas in there have been there for years - I did not have time to implement them, and no one clamored to get them implemented.
A completely different take is to revamp this library to bring it to the "modern php" era:
This is a bit more "controversial", as
In other words: is that worth doing at all? How many end users would we gain?
Btw, I am opening separate github issues for all of the features mentioned above
A lot of work has gone into the 'v4' - available as branch 5.3 so far. Still a lot to be done before I' consider it ready for release.
Here's the snapshot of the "roadmap" (more of a detailed checklist, really) as of today:
MINOR
Further updates now that version 4 is out:
MINOR
format:
content:
...and here is one more update:
rename master branch
modernize the extras package
test pake build actions: does everything still work ?
add a github hook that checks version nr before release
improve test container build:
docker scan
for securitysocket timeout: do we need to use stream_getinfo to properly detect it? (test & add test for it)
add tests for cookie names with spaces => add fix in 431 (??)
test creating client using full url 'http11://etc'. If it works, document it
test what is returned by multicall() when return type is xml
date helper: test what happens when a date object is passed in instead of a timestamp
emit a warning when encoding a resource to json in api emulation mode; try to error out when encoding invalid utf8
allow an easy way to disable demo/server/xx.php (eg. proxy) for installing on places such as gggeek.altervista.org ? (its as easy as deleting files from disk...)
problem with
backport fix for spaces in cookie value in client->setCookie to 3.1 ?
WONTFIX: new xmlrpc\value(-1) = empty value => but how can we fix it without breaking API compat?
WONTFIX: parsing fails with hhvm for
NB: all big refactoring and new functionality is moved off to V5 implementation. Possibly left for V4:
clean up test code syntax: use modern phpunit classes and methods
install 'de' locale for the one skipped test in Docker
add more tests for mixed http features: basic+digest auth on https/socket, helpers (date enc/decoding) etc...
add test case for client setting of curl extra options
add test cases for json_last_error
add test case for phpvals validation of types server-side in both jsonrpc and xmlrpc (eg: empty structs)
add test case for mixed-type servers in both jsonrpc and xmlrpc
add gui test for uri-too-long-error
test methods with latin-1 characters in their name (needs the server to work in latin-1 mode internally)
set up tests for:
add tests for arrayiterator access (also for phpxmlrpcval style) => ok ?
add tests for arrayaccess interface
use output buffer and debug mode to dump http payloads when tests fail without the need for the DEBUG flag => mostly done; needs better testing and would be nice if we could handle better curlopt_stderr
disallow multitest class to execute again single tests (after they have already been carried out by localhosttest)
allow usage of "std way" to define parameters for phpunit (besides env vars) -> rename phpunit.xml to .dist.xml
check out how to include php-code-coverage-verifier in automated tests
more tests for debugger/action (execute actual calls)
more tests for server/discuss and server/proxy (execute actual calls)
create a 'legacyAbuse' test suite which uses all public-but-should-not-have-been-so stuff
check usage of afl for lib testing
increase code coverage: iso8601decode, exportGlobals, Encoder::encode, Server::...
allow to run tests on php 5.3
--stderr
?format:
content:
One more update:
CD script does not connect to alt.org -> test on next release?
test/fix what is returned by multicall() when return type is xml
fix handling of parameters_types in the dispatch map
test: use mbstring (or iconv) if available to support more in/out charsets (eg. internal cp1252, ext. utf8) see code in https://github.com/gggeek/phpxmlrpc/issues/42 - it might already be working!
(same as above?) make Charset helper support CP1252 and the full range of chars including C1 (either here on in polyfill-xmlrpc)
date helper: test what happens when a date object or string is passed in instead of a timestamp. Is it useful to support that?
check out support of fsockopen-mode for http/2 and all other client features such as support for redirects
make debugger smarter about presence of js files (and jsonrpc files) ?
make wrapper be able to generate code with different namespace (for jsonrpc debugger)
create a custom server: both self-documenting and jsonrpc+xmlrpc -> a "combo" server... (either as 'demo' in the extras package, as part of the debugger container, or as a standalone container)
tests:
allow to avoid population of httpResponse in both Request and Response in non-debug scenarios
add Client::setTimeout method
allow Client to use specific decoding options when return_type = XMLParser::RETURN_PHP (esp. for date decoding)
replace usages of extension_loaded with function_exists, to allow polyfills
make all setXXX methods return $this
allow Server::add_to_map to set parameters_types
make all setCharsetEncoder methods static (why was this not done since day one?)
add setLogger() to classes missing it (HTTP, XMLParser); mention it in manual / add a demo for it
fix Client sometimes logging an error message but then continuing instead of returning a Fault, in sendPayloadSocket, prepareCurlHandle
add options to wrapXmlrpcServer to have the generated methods throw on fault. Also: make the generated code use phpvals by default. Also, when generating code wrapping an object instance for codegen usecase, allow a simpler way to set the obj on use
add demo servers for symfony and laravel
user manual:
api docs: improve HP after generating it with phpdoc: in main column add version nr, remove "packages"
add taskfile action to set up github hook
add gha workflow to trigger release of a new version of the debugger container upon a release of the main lib
make sure tests/index.php can not be triggered by non-phpunit requests
make Request::$httpResponse private and add protected __get (if possible) to log a deprecation warning
deprecate usage of params $timeout and $method in send(), log a deprecation warning when used
check if we can add warnings upon use of other deprecated methods and properties
add setOption to both Client and Server, deprecate all access to setXXX methods and $xxx members (use call, get and co.)
release 4.10
use userforks.io to get list of downstreams from gh: composer users, forks, code search for usages of bad methods
add a 'tight/fast' serialization mode as static var in PXR: serialize strings without
add constants for all string-valued parameters (such as return types)
bump requirements to 5.4, introduce traits such as loggerAware
test all usage of is_a; replace with instanceof ?
review cookie handling code against the latest cookies rfc (6265) - drop support for dead cookies specs
add to verify_compat.php testing for recent lib features, e.g. presence of specific curl constants
make its output nicer when run from the cli
check if we can reduce usages of preg_match - in a single call script, they take up 14% of wall time
run static code analyzers:
check speed diff vs. lstrojny/fxmlrpc
add curl multiplexing when using h2 in the sendParallel demo
change the files which do direct loading of vendor/autoload.php to allow for 'installed as dep' config
improve test container build:
docker scan
for securityfigure out y stream_context tests fail with php 5.4->7.1 on focal and later
rename master branch to main ?
should we default to http2
instead of h2
?
move sendParallel to extras, or to main Client ?
allow Client to throw in case of errors or Fault responses ? (demo file proxy.php might be sufficient...)
backport fix for spaces in cookie value in client->setCookie to 3.1 ?
WONTFIX: new xmlrpc\value(-1) = empty value => but how can we fix it without breaking API compat?
WONTFIX: parsing fails with hhvm for
NB: all big refactoring and new functionality is moved off to V5 implementation. Possibly left for V4:
install 'de' locale for the one test skipped in Docker (also, in GHA)
clean up test code:
add tests for dispatch map with a registered callable with a specific calling convention
add more tests for mixed http features: basic+digest auth on https/socket, helpers (date enc/decoding) etc...
add test case for client setting of curl extra options
test more server features (eg. is there any test of return_phpvals calling convention?) eg. function which adds user-defined debug
add test case for phpvals validation of types server-side in both jsonrpc and xmlrpc (eg: empty structs)
add test case for mixed-type servers in both jsonrpc and xmlrpc
add gui test for uri-too-long-error
test methods with latin-1 characters in their name (needs the server to work in latin-1 mode internally)
set up tests for:
add tests for arrayiterator access (also for phpxmlrpcval style) => ok ?
add tests for arrayaccess interface
more tests for debugger/action (execute actual calls)
more tests for server/discuss and server/proxy (execute actual calls)
increase code coverage: iso8601decode, exportGlobals, Encoder::encode, Server::...
create a 'legacyAbuse' test suite which uses all public-but-should-not-have-been-so stuff
check out how to include php-code-coverage-verifier in automated tests
check usage of afl for lib testing
allow to run tests on php 5.3
--stderr
?rebuild GUI based on a Bootstrap Admin theme ?
add tooltips with explanation/examples for all fields
do display somewhere the lib version (both phpxmlrpc and jsonrpc...)
externalize the debugger to its own composer package ? (it is done in v5...)
test alternatives to phpdoc: https://github.com/ApiGen/ApiGen, https://github.com/theseer/phpdox/
phpdoc docs: can we avoid generation of "xmlrpc" (or whatever it is named) package ? Use Readme for its homepage ? Also: add lib version nr. and doc generation date as page footer or in hp. Try with a bit of css magic...
content:
Release 4.10.0 has been published today, with a long list of fixes, improvements and deprecations, some of which were listed in the last "roadmap" update above, but definitely not all.
This proves once more that I am comically bad at planning and roadmapping 😅
Speaking in broad terms, this is what I expect to focus on, going forward:
Below here follow the latest update to the "detailed to do list" which I have been posting here for almost eight years!
--
nada!
add gha workflow to trigger release of a new version of the debugger container upon a release of the main lib
deploy to gggeek.altervista.org the demo server from the debugger container next to demo/server/server.php
add constants for all string-valued parameters (such as return types)
tighten parsing of xml-rpc: faulty fault responses, missing methodname, ... (see todos in xmlparser)
restore non-deprecated accessor to: Value::$_php_class, Request::$debug ?
add utility methods: PhpXmlRpc::setParser, setCharsetEncoder (take care about exp/imp globals) ?
fix XMLParser sometimes logging an error message but then continuing instead of throwing, when setting unsupported options ?
test all usage of is_a; replace with instanceof ?
create some demos (client, server) showcasing the new parsing options - esp. using dates-as-objects and strict parsing
add demo clients, servers for laravel
implement all missing http features in client socket mode, such as support for redirects, digest/ntlm auth, etc...
make Charset helper support CP1252 natively (without mbstring):
allow Client/Server::setOption('parsing_options') to add options for the XMLParser, so that Parser::parse() can be made independent of global state (PhpXmlRpc static variables)
remove all the recently added static vars from PhpXmlRpc ?
add to verify_compat.php testing for recent lib features, e.g. presence of specific curl constants
make its output nicer when run from the cli
run static code analyzers:
run an encoding/decoding pass with a profiler and check where time is spent
check speed diff vs. lstrojny/fxmlrpc
check any nonCamelCase method, add an alias and deprecate old name: resp::xml_header, srv:...
add curl multiplexing when using h2 in the sendParallel demo
move sendParallel to extras, or to main Client ?
change the files which do direct loading of vendor/autoload.php to allow for 'installed as dep' config
improve test container build:
docker scan
for securityfigure out y stream_context tests fail with php 5.4->7.1 on focal and later
rename master branch to main ?
should we default to http2
instead of h2
?
bump minimum requirements to php 7.x
drop all BC stuff, including the .inc layer
move Value::_php_class to a dedicated subclass (use existing git branch which has that already)
add interfaces for Logger, Parser, Encoder
remove setting $resp->raw_data on the server-side
allow Client to throw in case of errors or Fault responses ? (demo file proxy.php might be sufficient...)
allow the XMLParser to work directly on streams, alter request::parseResponseFile() to follow suit; add demo for large-response parsing (and measure memory difference)
move Encoder::decodeXml to XMLParser ?
move Request::ParseResponse, ParseResponseFile to the Client
add a 'compact/fast' serialization mode as static var in PXR: serialize strings without
see all other issues from https://github.com/gggeek/phpxmlrpc/issues/73
backport fix for spaces in cookie value in client->setCookie to 3.1 ?
WONTFIX: new xmlrpc\value(-1) = empty value => but how can we fix it without breaking API compat?
WONTFIX: parsing fails with hhvm for
NB: all big refactoring and new functionality is moved off to the NG implementation. Possibly left for v4/v5:
clean up test code:
investigate: when calling wrap_xmlrpc_method and wrapping fails, phpunit hangs (but outside of phpunit all is ok)
add test: validation of invalid methodname
test methods with latin-1 characters in their name (needs the server to work in latin-1 mode internally) ? note that utf8 and latin1 chars are not allowed by default in method names...
add test: response with not-closed server-debug comment
check: any Server tests which have been made redundant by more extensive parsing tests?
add test for encoding of chars 0-31 in utf8->ascii mode
also: do encode character 127
add tests for v3 api fixes of release 4.5.1 and all fixes up to 4.9.5
add tests for dispatch map with a registered callable with a specific calling convention => ok?
add more tests for mixed http features: basic+digest auth on https/socket, etc...
test more server features, eg. function which adds user-defined debug
add test case for phpvals validation of types server-side in both jsonrpc and xmlrpc (eg: empty structs)
add test case for mixed-type servers in jsonrpc (here ??)
add gui test for uri-too-long-error
set up tests for:
encoder tests: add testing of encoding/decoding with options, eg. auto_dates
add a test for interop error codes
add tests for arrayiterator access (also for phpxmlrpcval style) => ok ?
add tests for arrayaccess interface => ok ?
more tests for debugger/action (execute actual calls)
more tests for server/proxy (execute actual calls)
increase code coverage: iso8601decode, exportGlobals, Encoder::encode, Server::... (review coverage reports 1st)
create a 'legacyAbuse' test suite which uses all public-but-should-not-have-been-so stuff
check out how to include php-code-coverage-verifier in automated tests
check usage of afl for lib testing
verify: can tests still run on ubuntu precise ? (is stock php version >= 5.4 ?)
create a self-contained suite of invalid xml-rpc requests/responses, which can be used for parser validation, eg. values not valid according to the spec, bad element nesting, unknown elements, etc (leaving outside invalid xml and charset encoding issues, or at least storing them separately)
--stderr
?rebuild GUI based on a Bootstrap Admin theme ?
add tooltips with explanation/examples for all fields
externalize the debugger to its own composer package ? (it is done in NG...)
test alternatives to phpdoc: https://github.com/ApiGen/ApiGen, https://github.com/theseer/phpdox/
phpdoc docs: can we avoid generation of "xmlrpc" (or whatever it is named) package ? Use Readme for its homepage ? Also: add lib version nr. and doc generation date as page footer or in hp. Try with a bit of css magic...
content:
I've been using this XML-RPC library for quite some time now. I'm wondering when are new features expected? What can we expect? What are the plans with this project at all? A heads up would be nice.