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

Decide Moodle 4.5 requirements and push them to environment.xml (due date: 2024-05-27)

XMLWordPrintable

    • MOODLE_405_STABLE
    • MOODLE_401_STABLE, MOODLE_402_STABLE, MOODLE_403_STABLE, MOODLE_404_STABLE
    • MDL-79809-401
    • MDL-79809-403
    • MDL-79809-404
    • MDL-79809-main
    • Hide

      0 - Prerequisites

      1. Ensure that there is NOT any $CFG->moodledata/environment directory in your installation. If it exists... it contains old environment info. Remove the directory completely before continuing with the tests below.

      A - On Main, 404, 403, 402, 401 (all supported and security supported branches):

      Note:

      • Usually this needs to be tested on all the databases that are affected by the changes, but because there aren't database changes, it's enough to test this only with one of them.
      1. Go to admin -> server -> environment
      2. One "4.5 upwards" Moodle version should be available.
      3. VERIFY that It shows the same requirements as the 4.5 version except for PHP version
        1. PHP Version should be 8.1 or higher

      B - Verify, for all the numeric (XYZ) branches above, that the environment.xml file is 100% the same (requires git or diff use). All the commands should return NO differences (nothing should be output):

      Note: It's enough to test on one instance only (e.g. on a main instance)

      1. git diff MOODLE_XYZ_STABLE main admin/environment.xml

      C - Upgrade tests (easier with MDK):

      Note: Test on main only. No need to test on the other branches.

      C-1 Using minimum supported version

      1. Install Moodle 4.1.2
        1. Uninstall your current instance

          mdk uninstall -y
          

        2. Checkout the 4.1.2 tag

          git checkout v4.1.2
          

        3. Install

          mdk install
          

      2. Add some courses and one activity or two

        mdk run makecourse
        

      3. Attempt upgrade to main
        1. Checkout the main branch.

          git checkout main
          

        2. Upgrade either via the browser or via CLI (mdk upgrade)
      4. VERIFY: that upgrade works

      C-2 Using older, non-supported version

      1. Install Moodle 4.1.1
        1. Uninstall your current instance

          mdk uninstall -y
          

        2. Checkout the 4.1.1 tag

          git checkout v4.1.1
          

        3. Install

          mdk install
          

      2. Add some courses and one activity or two

        mdk run makecourse
        

      3. Attempt upgrade to main
        1. Checkout the main branch.

          git checkout main
          

        2. Open the moodle instance on your browser
      4. VERIFY: that upgrade is blocked
      Show
      0 - Prerequisites Ensure that there is NOT any $CFG->moodledata/environment directory in your installation. If it exists... it contains old environment info. Remove the directory completely before continuing with the tests below. A - On Main, 404, 403, 402, 401 (all supported and security supported branches): Note: Usually this needs to be tested on all the databases that are affected by the changes, but because there aren't database changes, it's enough to test this only with one of them. Go to admin -> server -> environment One "4.5 upwards" Moodle version should be available. VERIFY that It shows the same requirements as the 4.5 version except for PHP version PHP Version should be 8.1 or higher B - Verify, for all the numeric (XYZ) branches above, that the environment.xml file is 100% the same (requires git or diff use). All the commands should return NO differences (nothing should be output): Note: It's enough to test on one instance only (e.g. on a main instance) git diff MOODLE_XYZ_STABLE main admin/environment.xml C - Upgrade tests (easier with MDK): Note: Test on main only. No need to test on the other branches. C-1 Using minimum supported version Install Moodle 4.1.2 Uninstall your current instance mdk uninstall -y Checkout the 4.1.2 tag git checkout v4.1.2 Install mdk install Add some courses and one activity or two mdk run makecourse Attempt upgrade to main Checkout the main branch. git checkout main Upgrade either via the browser or via CLI ( mdk upgrade ) VERIFY : that upgrade works C-2 Using older, non-supported version Install Moodle 4.1.1 Uninstall your current instance mdk uninstall -y Checkout the 4.1.1 tag git checkout v4.1.1 Install mdk install Add some courses and one activity or two mdk run makecourse Attempt upgrade to main Checkout the main branch. git checkout main Open the moodle instance on your browser VERIFY : that upgrade is blocked
    • 6
    • Team Hedgehog 2024 Sprint 2.2, Team Hedgehog 2024 Sprint 2.3

      Policy: PHP & Moodle supported versions

      Since Moodle 3.5 (MDL-59159), these rules apply to decide Minimum PHP and Moodle versions supported:

      1. A LTS will always require the previous LTS (or later) for upgrading.
      2. The maximum PHP version supported for a branch will be the max one achieved along the life of the branch. Usually with .0 releases but may happen later (we added support for php70 with 3.0.1, or support for php73 with 3.6.4, for example).
      3. The minimum PHP version supported for a branch will be the lower of:
        • The minimum version supported in any way by php the day of the Moodle release (so we provide slow, progressive increments).
        • The maximum PHP version supported by the previous LTS branch (so we guarantee jumping between LTS is possible without upgrading PHP at the same time).

      We need to decide ASAP about all the PHP/DB/Moodle versions requirements and put all them into the environmental tests (adding them to all supported branches).

      All the still open linked issues have been also cloned here from the 4.4 sister issue (MDL-78496).

      Usual discussions:

      Feel free to propose areas to be discussed here. A numbered list with all them will be created to vote and decide the final outcomes of this issue.

       Related Tasks (create issues/PRs whenever they apply):

      (We will continue with PHP 8.1 - No changes) TODO-0: Recommendation. It's useful to look to the changes performed for previous versions, specially LTS ones, to see which sort of changes must be applied with this issue. Specially remember that any change to the minimum supported PHP always implies a change to the minimum upgradeable Moodle version (to the first one supporting the new PHP requirement).

      (There are no changes for PHP, Database, Extensions...)TODO-1: Once the agreement is settled, if there are raised requirements (PHP/Database/Extensions...) create a MDLSITE issue to ensure that external testers environment is ready for them.

      (There are no changes, so the sites can continue to run with the previous requirements)TODO-2: Once the agreement is settled, create a MDL issue about to guarantee that all the Community sites sites running the dev version fulfil the new requirements.

      (There are no changes for PHP, Database, Extensions...) TODO-3: Once the agreement is settled, warn (apart from the previous points) about the agreed changes, listing them, so everybody is ready in advance for the upcoming changes. This includes:

      • Integration exposed post.
      • General dev chat.
      • Internal dev chats.

      (There are no changes for PHP and Extensions...) TODO-4: Composer: To be done as part of this issue (main only):

      1. Raised lower PHP version does imply that core composer stuff need to be updated and regenerated with it (link to detailed instructions).
      2. Also, check that all the php and extensions requirements and recommendations in the composer.json file match the ones specified in the admin/environment.xml file (defined by this issue).

      TODO-5: Environment and upgrade: To be done as part of this issue:

      1. Add the new version section to the admin/environment.xml files, for all the supported (security included) branches. Ensure all the new requirements are applied.
      2. If Moodle requirements have changed, remove any upgrade step (and upgradelib functions) not used anymore (main only).
      3. Also, don't forget to edit the moodle_minimum_php_version_is_met() function with any new PHP requirement being changed here (see MDL-80819 as the previous update to that).

      (There are no changes for PHP and Extensions...) TODO-6: GHA integration: To be done as part of this issue (main only). Ensure requirements are fulfilled and there are jobs using the new versions.

      (There are no changes for PHP) TODO-7: phpcs.xml.dist : To be done as part of this issue (main only). Ensure that the testVersion config setting matches the range of PHP supported versions. Note that for main branch we leave the range open always.

      (There are no changes for PHP)TODO-8: Once the agreement is settled, ensure that:

      • The affected php docker images fulfill all the requirements (extensions...).
      • Same for (still) non-dockered stuff, like:
        • Legacy CI server. Ensure that bot main jobs and CiBoT runs are executed with minimum supported php version.
        • Performance-comparison jobs.

      (There are no changes for PHP, Database and Extensions...) TODO-9: Once the patch is ready to peer-review, update all the configuration @ CI infrastructure:

      • Ensure (nightlyjobs) that every Moodle branch knows its lowest and highest PHP supported versions.
      • Verify that the runner (moodle-ci-runner) is using correct database versions.
      • Configure the following jobs if there is a PHP version bump:
        1. All "bulk-prelaunch" jobs (5), in the "Tracker" tab, configure main branch run using the new PHP version.
        2. All "developer requested" jobs (4), in the "Testing" tab, configure them to run by default using the new PHP version (moving it to the top of the list in the available PHP versions list, unless they already have a newer version).

      TODO-10: Once applied upstream, changes are needed @ download.moodle.org to show the new requirements there (serverscripts).

      TODO-11: Once applied upstream, ensure that both the Mac and Windows packages fulfill the requirements and work ok.

      TODO-12: Once applied upstream, warn (apart from the previous points) about the imminent changes, listing them, so everybody is ready in advance for the upcoming changes. This includes:

      • Integration exposed post.
      • General dev chat.
      • Internal dev chats.

      TODO-13 Once applied upstream, review the travis (only moodle-plugin-ci) and github actions configuration for various repositories. The new core requirements may be hitting them. Also add new branches if missing. Known to need review / fix repos include:

      TODO-14: Consider if there is any PHPUnit upgrade to perform whenever there are PHP version changes.

      • PHPUnit 10 has been released, but we aren't in a hurry to upgrade. More yet, it only supports PHP 8.1 and up, so we cannot update to it until that PHP version is made a requirement for Moodle.

      TODO-15: Docs:

      1. If there is any raise to PHP requirements, document it the PHP docs page (example PR).
      2. Ensure that all the requirements are shown in the corresponding docs (release and/or upgrade). Ask @ devdocs if the new version docs need to be created (example issue).
      3. Ensure that there are landing pages @ docs for all the environmental changes performed.

      TODO-16: Last one, to be able to create it with all the information in this issue:

      1. Ensure that the (clone of this) issue for next (to this) requirements issue is created and contains all the information.
      2. All the non-resolved details and issues must be dragged (linked) to the new issue.

      TIA and ciao

        1. MDL-79809 - A.png
          MDL-79809 - A.png
          1.43 MB
        2. MDL-79809 - b.png
          MDL-79809 - b.png
          173 kB
        3. MDL-79809 - c-1.png
          MDL-79809 - c-1.png
          108 kB
        4. MDL-79809 - c-2.png
          MDL-79809 - c-2.png
          627 kB

            huongn@moodle.com Huong Nguyen
            jpataleta Jun Pataleta
            David Woloszyn David Woloszyn
            Jun Pataleta Jun Pataleta
            Ron Carl Alfon Yu Ron Carl Alfon Yu
            Votes:
            0 Vote for this issue
            Watchers:
            26 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 day, 3 hours, 45 minutes
                1d 3h 45m

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