Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-37355

WS servers cleaning process should auto cast object into array

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: 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

      Description

      WS servers cleaning process should auto cast object into array.

        Gliffy Diagrams

          Issue Links

            Activity

            Hide
            jerome Jérôme Mouneyrac added a comment -

            Note that you need to cherry-pick MDL-37358

            Show
            jerome Jérôme Mouneyrac added a comment - Note that you need to cherry-pick MDL-37358
            Hide
            ankit_frenz 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_frenz 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
            jerome Jérôme Mouneyrac added a comment -

            Fixed, pushing to integration. Thanks Ankit.

            Show
            jerome Jérôme Mouneyrac added a comment - Fixed, pushing to integration. Thanks Ankit.
            Hide
            stronk7 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
            stronk7 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
            poltawski Dan Poltawski added a comment -

            Integrated, thanks Jerome.

            Show
            poltawski Dan Poltawski added a comment - Integrated, thanks Jerome.
            Hide
            salvetore 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
            salvetore 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
            poltawski 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
            poltawski 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:
                  Fix Release Date:
                  14/May/13