Rewrite XML RPC module to services and plugins

Created on 24 April 2013, over 11 years ago
Updated 14 April 2023, over 1 year ago

Problem/Motivation

xmlrpc is an old and outdated module. We should bring it up to speed with the Drupal 8 Plugin API, services and OOP.

Proposed resolution

The xmlrpc module provides a server to serve XML-RPC requests on xmlrpc.php and a client API to retrieve requests from other URLs

Convert those to services.

(DONE)
Patch in #22:
- XmlRpcBase (abstract class with methods needed by both Client and Server)
-- XmlRpcClient implements XmlRpcClientInterface (this is a service xmlrpc.client)
-- XmlRpcServer implements XmlRpcServerInterface (service as well xmlrpc.server)

Each value outputted in an XML-RPC response is represented by a special tag specified by the XML-RPC specification.
Values can be arrays, strings, boolean, etc.
Convert each specific value's implementation to a plugin so they are easily swappable and can be created on runtime depending on the actual response.

(DONE)
Patch in #22:

- XmlRpcValueInterface common interface for all values (including error) with a method getXml() which provides the specific XML for this type of value.
--XmlRpcArray
--XmlRpcBase64
--XmlRpcBoolean
--XmlRpcDateTime
--XmlRpcDouble
--XmlRpcError
--XmlRpcInteger
--XmlRpcString
--XmlRpcStruct

Remaining tasks

Original report by cconrad

Part of #1971384: [META] Convert page callbacks to controllers β†’

For instructions on how to convert a page callback into a controller, see the WSCCI Conversion Guide.

πŸ“Œ Task
Status

Postponed

Version

1.0

Component

Code

Created by

πŸ‡ΈπŸ‡ͺSweden cconrad

Live updates comments and jobs are added and updated live.
  • API change

    Changes an existing API or subsystem. Not backportable to earlier major versions, unless absolutely required to fix a critical bug.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡³πŸ‡±Netherlands megachriz

    If someone ever likes to pick this one up again, maybe it is a better idea to use an existing XML-RPC library instead of trying to code one ourselves.

    On packagist I found the following one: https://packagist.org/packages/phpxmlrpc/phpxmlrpc
    Not saying we should use that one, because I haven't checked its code and features. But that's one we could consider to be using since it looks like to be actively maintained.

    For now I mark this issue as postponed, until someone would like to see this module to be modernized.

Production build 0.71.5 2024