Moodle
  1. Moodle
  2. MDL-37355

WS servers cleaning process should auto cast object into array

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.5
    • Fix Version/s: 2.5
    • Component/s: Web Services
    • Testing Instructions:
      Hide

      phpunit externallib_testcase lib/tests/externallib_test.php

      Also manually:
      1- Edit any external functions to return an object. I personally used user/externallib.php:create_users(). i edited it to return user objects with id/username instead of arrays with id/username.
      2- run the PHP-SOAP client (https://github.com/moodlehq/sample-ws-clients/tree/master/PHP-SOAP). You can test with REST too but you'll need to cheery-pick MDL-37358.

      You should see the resulting XML code with the new user id/username.

      Show
      phpunit externallib_testcase lib/tests/externallib_test.php Also manually: 1- Edit any external functions to return an object. I personally used user/externallib.php:create_users(). i edited it to return user objects with id/username instead of arrays with id/username. 2- run the PHP-SOAP client ( https://github.com/moodlehq/sample-ws-clients/tree/master/PHP-SOAP ). You can test with REST too but you'll need to cheery-pick MDL-37358 . You should see the resulting XML code with the new user id/username.
    • Affected Branches:
      MOODLE_25_STABLE
    • Fixed Branches:
      MOODLE_25_STABLE
    • Pull Master Branch:
      MDL-37355-master
    • Rank:
      46976

      Description

      WS servers cleaning process should auto cast object into array.

        Issue Links

          Activity

          Hide
          Jérôme Mouneyrac added a comment -

          Note that you need to cherry-pick MDL-37358

          Show
          Jérôme Mouneyrac added a comment - Note that you need to cherry-pick MDL-37358
          Hide
          Ankit Agarwal added a comment -

          Hi Jerome,
          The patch looks good, its missing a full stop in the comment. But feel free to ignore that and submit for integration.
          Thanks

          Show
          Ankit Agarwal added a comment - Hi Jerome, The patch looks good, its missing a full stop in the comment. But feel free to ignore that and submit for integration. Thanks
          Hide
          Jérôme Mouneyrac added a comment -

          Fixed, pushing to integration. Thanks Ankit.

          Show
          Jérôme Mouneyrac added a comment - Fixed, pushing to integration. Thanks Ankit.
          Hide
          Eloy Lafuente (stronk7) added a comment -

          The main moodle.git repository has just been updated with latest weekly modifications. You may wish to rebase your PULL branches to simplify history and avoid any possible merge conflicts. This would also make integrator's life easier next week.

          TIA and ciao

          Show
          Eloy Lafuente (stronk7) added a comment - The main moodle.git repository has just been updated with latest weekly modifications. You may wish to rebase your PULL branches to simplify history and avoid any possible merge conflicts. This would also make integrator's life easier next week. TIA and ciao
          Hide
          Dan Poltawski added a comment -

          Integrated, thanks Jerome.

          Show
          Dan Poltawski added a comment - Integrated, thanks Jerome.
          Hide
          Michael de Raadt added a comment -

          Test result: Success!

          Tested in Master only.

          Tested with REST and SOAP clients.

          The change from MDL-37358 was required for this to work.

          You can pass MDL-37358 also, at least in Master.

          Show
          Michael de Raadt added a comment - Test result: Success! Tested in Master only. Tested with REST and SOAP clients. The change from MDL-37358 was required for this to work. You can pass MDL-37358 also, at least in Master.
          Hide
          Dan Poltawski added a comment -

          Hurray! We did it! Thanks to all the reporters, testers, user and watchers for a bumper week of Moodling!

          Show
          Dan Poltawski added a comment - Hurray! We did it! Thanks to all the reporters, testers, user and watchers for a bumper week of Moodling!

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: