← Back to team overview

mahara-contributors team mailing list archive

[Bug 1979373] [NEW] Deprecate SOAP support

 

Public bug reported:

While working through PHPStan issues I found that the SOAP
implementation should have been reliably throwing errors. The lack of
issues in this area suggests that this is not being used at all.

Rather than supporting what is now quite old code we should just
deprecate it and remove it from the codebase.

The area that drew this to my attention is here:

https://git.mahara.org/mahara/mahara/-/blob/main/htdocs/lib/mahara.php#L2640

$wsseSoapClient = new webservice_soap_client_wsse(
  array($client, '_doRequest'),
  $client->wsdlfile,
  $client->getOptions()
);

The first parameter, which should declare our request, is unused in webservice_soap_client_wsse()
The third parameter is unused also. In the webservice_soap_client_wsse() class there is a private $options, but this is never set.

Also, webservice_soap_client(), which gives us $client, has no
getOptions() method so this should also be erroring out loudly.

** Affects: mahara
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
Matching subscriptions: mahara-contributors
https://bugs.launchpad.net/bugs/1979373

Title:
  Deprecate SOAP support

Status in Mahara:
  New

Bug description:
  While working through PHPStan issues I found that the SOAP
  implementation should have been reliably throwing errors. The lack of
  issues in this area suggests that this is not being used at all.

  Rather than supporting what is now quite old code we should just
  deprecate it and remove it from the codebase.

  The area that drew this to my attention is here:

  https://git.mahara.org/mahara/mahara/-/blob/main/htdocs/lib/mahara.php#L2640

  $wsseSoapClient = new webservice_soap_client_wsse(
    array($client, '_doRequest'),
    $client->wsdlfile,
    $client->getOptions()
  );

  The first parameter, which should declare our request, is unused in webservice_soap_client_wsse()
  The third parameter is unused also. In the webservice_soap_client_wsse() class there is a private $options, but this is never set.

  Also, webservice_soap_client(), which gives us $client, has no
  getOptions() method so this should also be erroring out loudly.

To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/1979373/+subscriptions



Follow ups