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

Upgrade phpunit to 8.5.x

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Minor Minor
    • 3.10
    • 3.9, 3.10, 4.0
    • Unit tests
    • MOODLE_310_STABLE, MOODLE_39_STABLE, MOODLE_400_STABLE
    • MOODLE_310_STABLE
    • Hide

      Ensure that all CI test pass ok (behat included, because this issue comes with a noticeable composer.lock changeset).

      Also check that there aren't "W" (warnings about deprecated stuff) in the phpunit output.

      Show
      Ensure that all CI test pass ok (behat included, because this issue comes with a noticeable composer.lock changeset). Also check that there aren't "W" (warnings about deprecated stuff) in the phpunit output.

      Right now we are running phpunit 7.5.x (MDL-65204). It's time to bump to newer version.

      Candidates are, right now: (source link):

      • 8.x: supports php 7.2, 7.3 and 7.4 (that aligns 100% with our supported PHP versions). Huge changes required. Fully supported till Feb 2021.
      • 9.x: still not released. Not enough info right now. Maybe to be considered next year.

      Because of a better alignment with Moodle 3.9 PHP supported versions (see ongoing work @ MDL-66260) this issue is about to upgrade to phpunit 8.5. Knowing that changes aren't trivial.

      SUMMARY:

      1. Upgrade composer to the target phpunit version (link to procedure).
      2. Fullfill phpunit API required changes.
      3. Fix other incompatibilities detected.
      4. Add a note @ upgrade.txt, pointing to the docs (and maybe main points).
      5. Verify that the new code is passing against ALL php supported versions.
      6. Verify that behat continues passing without problem
      7. Verify that incomplete and skipped tests are shown using the -v[erbose] switch.
      8. Send the issue to peer-review, yay!

      Some notes to reviewer(s).

      • It's recommended to review the patch commit by commit. I've tried to introduce all the important information within each commit message.
      • Don't become crazy about checking the hundreds of changes to assertions 1 by 1. PHPUnit execution will tell you if there is any change missing (will emit warning or failure). Better focus on commits with logic.
      • Verify that there are commits corresponding to all the "DONE" points in the comment used to trace the progress.

      TODO (after rolled upstream):

      1. Create a new section like this @ the development Moodle Docs, explaining the main differences and linking to complete information.
      2. Also fill this table with the new version just added.

            stronk7 Eloy Lafuente (stronk7)
            stronk7 Eloy Lafuente (stronk7)
            Simey Lameze Simey Lameze
            Sara Arjona (@sarjona) Sara Arjona (@sarjona)
            CiBoT CiBoT
            Votes:
            3 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 2 weeks, 4 hours, 54 minutes
                2w 4h 54m

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.