turnitin / moodle-plagiarism_turnitin

Turnitin Plagiarism plugin for Moodle
http://www.turnitin.com
45 stars 65 forks source link

Deprecated return type in Integrations\PhpSdk\Soap::__doRequest() #702

Open ScottVerbeek opened 3 months ago

ScottVerbeek commented 3 months ago

I'm encountering the following deprecation warning in plagiarism/turnitin/vendor/Integrations/phpsdk-package/src/Soap.php on line 369:

Deprecated: Return type of Integrations\PhpSdk\Soap::__doRequest($request, $location, $action, $version, $one_way = null) should either be compatible with SoapClient::__doRequest(string $request, string $location, string $action, int $version, bool $oneWay = false): ?string, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice

Additional Info: PHP version: 8.1 Relevant code:

    /**
     * @param string $request
     * @param string $location
     * @param string $action
     * @param int $version
     * @param null $one_way
     * @return mixed|string
     * @throws TurnitinSDKException
     */
    public function __doRequest($request, $location, $action, $version, $one_way = null)

Steps to reproduce the warning:

  1. Setup a course in a Moodle 4.3 on a PHP 8.1 environment.
  2. Allow grading on assignments
  3. Set config
    $CFG->debug           = (E_ALL | E_STRICT); // DEBUG_DEVELOPER
    $CFG->debugdisplay    = 1;
  4. Add assigment
  5. Open grading for assignment mod/assign/view.php?id=&action=grading
  6. Observe Deprecation message