Releases: gggeek/phpxmlrpc-jsonrpc
Release list
1.0.1
-
fixed: the
_prepend.phpfile used by the demos would not locate the php autoloader when the library is installed as
dependency -
fixed: setting a custom Parser or CharsetEncoder to the JsonRpc Value, Request, Response and Server classes does not
reset anymore the same for the corresponding XmlRpc parent class, and vice-versa. This makes it possible to freely
mix and match json-rpc and xml-rpc within the same php script.
NB: this can have an impact in you access directly protected static members$parserand$charsetEncoder. -
improved: make it easy to allow CORS requests to the demo server on hosts other than the altervista one
-
improved: moved the public demo server and debugger from altervista.org to tanoconsulting.com
1.0.0
-
new: default the code to use json-rpc version 2.0 protocol, while allowing usage of json-rpc 1.0 too.
The easiest way to switch everything to keep using version 1.0 is to add a call
PhpJsonRpc::$defaultJsonrpcVersion = PhpJsonRpc::VERSION_1_0;at the beginning of your code -
new: added a
Notificationclass, to be used for sending json-rpc notification calls -
breaking change: when creating a Request, passing in a NULL id will now automatically generate a unique id.
To manually create notifications, use the newNotificationclass instead.
Note that this change does not apply if using the legacyjsonrpcmsgclass
The "id" of both Request and Response objects has been made protected. To access it, use theid()method. -
breaking change: the Server will now respond to Notifications (request with no Id / null Id) with an HTTP 204
response with no body -
breaking change: when sending a Notification call,
Client::send()will now return true instead of a Response object,
iff the server returns an empty http response body -
breaking change: when a Client sends invalid json, the returned response will sport a faultCode of 100+X, with X
corresponding to the value returned by php functionjson_last_error, eg. 104 for no data, instead of previous 5 -
breaking change:
Parser::parseRequest()andParser::parseResponse()always return an array, even on failure.
Also, direct access to$parser->_xhis deprecated -
breaking change: classes
RequestandResponsemethod and disallow access to the$idmember. They gained an
accessor methodid()to retrieve the id -
breaking change:
Serializer::serializeRequest()andSerializer::serializeResponse()have had the order of their
arguments changed -
fixed: when receiving empty requests, the returned response's error code is now the same on php 5 as it is on
later php versions -
fixed:
PhpJsonRpc::setLogger()was not injecting the logger into theSerializerclass -
fixed: removed warnings when running on php 8.5
-
improved: it is now possible to set the Server option
OPT_DEBUG_FORMATto value 'extra_member', to have the debug
info (emitted when the server debug level is > 2) serialized as an extra member in the response, rather than as
a js comment, which requires a json5 parser or this library's client -
improved: the data returned by json-rpc method "interop.whichToolkit" now reports info about this package instead
of info related to phpxmlrpc -
improved: added demos for client-side usage, as well as demos for symfony integration of both client and server
-
improved: support for
Valueobjects of type 'dateTime.iso8601' - even though datetimes are not part of JSON-RPC or JSON -
improved: more warnings are emitted in unexpected/unsupported scenarios (to the php error log by default)
-
improved: added CI testing on php 8.4 and 8.5. Default the local testing container to using PHP 8.1 on Ubuntu Jammy
-
bumped the minimum required version of phpxmlrpc/phpxmlrpc to 4.11.4
-
other API changes:
- classes
Client,RequestandResponsegained methodsgetJsonRcVersionandsetjsonRpcVersion - class
Requesthas gained a 5th constructor argument:$jsonrpcVersion = null - class
Requesthas gained a method:getParamName($i), useful for dealing with named-arguments requests.
Also, its methodaddParamgained a 2nd argument:$name=null - class
Requesthas gained a protected method:generateId() - visibility of
Request::$content_typehas been lowered from public to protected - class
Responsehas gained a methodsisFromServerandsetIsFromServer($value) - method
Server::execute()has gained a 5th param:$jsonrpcVersion = null - class
Servernow overrides more of the parent's methods - member
client->$no_multicalldefaults tonull, as the support for multicall calls depends on the json-rpc version
in use (version 2.0 does support it via "batch" calls) - member
$parser->_xhhas gained new elements - class
Wrappergained methodswrapJsonrpcServerandwrapJsonrpcMethodas aliases for existing methods, as well
as members$prefixand$allowedResponseClass
- classes
1.0-beta2
-
bumped the minimum required version of php to 5.4
-
bumped the minimum required version of phpxmlrpc/phpxmlrpc to 4.10.1, fixing the
Client->callmethod sometimes returning an xml-rpc response instead of a json-rpc one -
there is support for extra character sets than UTF-8/ISO-8859-1/ASCII when the php
mbstringextension is installed, both as internal application charset and as received payload -
fixed: a "null" value was not considered a valid response
-
fixed generation of comments server-side and parsing them client-side
-
added method
PhpJsonRpc::setLoggerto allow overtaking the logger for all JsonRpc classes -
made all error messages go through the Logger facility instead of calling directly
error_log -
made sure php warnings in method handlers do not disrupt the server even when it has debug level 0 and 1
-
multiple fixes to accommodate changes in the phpxmlrpc to 4.10 API, including support for server-side per-method-handler parameter-types declarations and adding
httpResponsedata to parsed Responses -
fixed one warning with php 8.2 when running a Server
-
fixed encoding of DateTime objects with php 5.4 in
Encoder::encode -
prefer emitting "Content-type: application/json" to "Content-type: application/json; charset=UTF-8", as per the current RFCs
-
fixes to demo files and benchmark.php
-
run CI tests also on php 8.3
-
BC notes: the
Parser::parseRequestandParser::parseResponsemethods now accept (and are called with) a different set of arguments;
they also return an array instead oftrueupon success
1.0 beta 1
bumped the minimum required version of phpxmlrpc/phpxmlrpc to 4.9.2