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

Decide Moodle 4.1 requirements and push them to environment.xml (due date: 2022-06-01)

XMLWordPrintable

    • MOODLE_311_STABLE, MOODLE_39_STABLE, MOODLE_400_STABLE
    • Hide

      Don't use Moodle 4.1 or up

      Show
      Don't use Moodle 4.1 or up
    • 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 Master, 400, 311 and 39 (all supported and security supported branches):

      Note: This needs to be tested on all the databases that are affected by the changes (Check the databases mentioned on the list)

      1. Go to admin -> server -> environment
      2. One "4.1 upwards" Moodle version should be available.
      3. VERIFY that It shows the same requirements as the 4.0 version but with these differences:
        1. PHP 7.4 is required (instead of 7.3).
        2. Moodle 3.9 is required (instead of 3.6)
        3. Databases
          • MariaDB 10.4 is required (instead of 10.2.29)
          • Oracle 19 is required (instead of 11.2)
          • PostgreSQL 12 is required (instead of 10).

      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 master instance)

      1. git diff MOODLE_XYZ_STABLE master admin/environment.xml

      C - Upgrade tests (easier with MDK):

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

      C-1 Using minimum supported version

      1. Install Moodle 3.9.0
        1. Uninstall your current instance

          mdk uninstall -y
          

        2. Checkout the 3.9.0 tag

          git checkout v3.9.0
          

        3. Install

          mdk install
          

      2. Add some courses and one activity or two

        mdk run makecourse
        

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

          git checkout master
          

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

      C-2 Using older, non-supported version

      Note: You cannot use Postgres 12 or newer for testing 3.8.0, as it only supports up to Postgres 11. Postgres 12 onwards support was introduced in 3.8.2 (MDL-67414).

      1. Install Moodle 3.8.x
        1. Uninstall your current instance

          mdk uninstall -y
          

        2. Checkout the 3.8.0 tag

          git checkout v3.8.0
          

        3. Install

          mdk install
          

      2. Add some courses and one activity or two

        mdk run makecourse
        

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

          git checkout master
          

        2. Open the moodle instance on your browser
      4. VERIFY: that upgrade is blocked

      D Verify that the xmlrpc environmental warnings work ok

      D-0 Requirements

      1. Use PHP 7.4 and ensure that the xmlrpc extension is installed.
      2. Be able to edit a php file (to avoid having to configure Mnet completely.

      D-1 Using MOODLE_39_STABLE

      1. Install Moodle 3.9.x
      2. Go to Admin -> Server -> Environment
      3. In the "Moodle version" menu, select all the versions available (3.9.x, 3.10, 3.11, 4.0 and 4.1 upwards).
        1. Verify that NONE of them show any warning at the bottom of the page related with xmlrpc.
      4. Go to Admin -> Plugins -> Web services -> Manage protocols.
      5. Enable the XML-RPC protocol.
      6. Go to Admin -> Server -> Environment
      7. In the "Moodle version" menu, select all the versions available (3.9.x, 3.10, 3.11, 4.0 and 4.1 upwards).
        1. Verify that 3.9.x and 3.10 DON'T SHOW any warning at the bottom of the page related with xmlrpc.
        2. Verify that 3.11 and up SHOW a warning with code "xmlrpc_webservice_usage" and text: "It has been detected that the XML-RPC Web Service protocol...."
      8. Go to Admin -> Plugins -> Web services -> Manage protocols.
      9. Disable the XML-RPC protocol.
      10. Go to Admin -> Advanced features
      11. Enable Networking and Save changes.
      12. Edit the lib/upgradelib.php file.
      13. Change the line (near the end)

        $actualhost = 0;


        by

        $actualhost = 1;

      14. Go to Admin -> Server -> Environment
      15. In the "Moodle version" menu, select all the versions available (3.9.x, 3.10, 3.11, 4.0 and 4.1 upwards).
        1. Verify that 3.9.x and 3.10 DON'T SHOW any warning at the bottom of the page related with xmlrpc.
        2. Verify that 3.11 and up SHOW a warning with code "xmlrpc_mnet_usage" and text: "It has been detected that the Moodle Networking is enabled on your site...."
      16. Change the line back to the original

        $actualhost = 0;

      17. Go to Admin -> Advanced features
      18. Enable portfolios and save changes
      19. Go to Admin -> Plugins -> Portfolios -> Manage portfolios
      20. Edit the lib/upgradelib.php file.
      21. Change the line (near the end)

        if (array_key_exists('mahara', $portfolios)) {


        by

        if (!array_key_exists('mahara', $portfolios)) {

      22. Go to Admin -> Server -> Environment
      23. In the "Moodle version" menu, select all the versions available (3.9.x, 3.10, 3.11, 4.0 and 4.1 upwards).
        1. Verify that 3.9.x and 3.10 DON'T SHOW any warning at the bottom of the page related with xmlrpc.
        2. Verify that 3.11 and up SHOW a warning with code "xmlrpc_mahara_usage" and text: "It has been detected that the Mahara ePortfolio is enabled..."
      24. Change the line back to the original

        if (array_key_exists('mahara', $portfolios)) {

      D-2 Using MOODLE_311_STABLE

      1. Repeat all the steps in the previous section, only difference is that 3.9.x+ isn't shown there, but the minimum version is 3.11.x+ (so the verifications including 3.9.x and 3.10.x can be ignored).

      D-3 No tests are needed for 400_STABLE and master, the check already existed there and nothing has been changed.

      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 Master, 400, 311 and 39 (all supported and security supported branches): Note: This needs to be tested on all the databases that are affected by the changes (Check the databases mentioned on the list) Go to admin -> server -> environment One "4.1 upwards" Moodle version should be available. VERIFY that It shows the same requirements as the 4.0 version but with these differences: PHP 7.4 is required (instead of 7.3). Moodle 3.9 is required (instead of 3.6) Databases MariaDB 10.4 is required (instead of 10.2.29) Oracle 19 is required (instead of 11.2) PostgreSQL 12 is required (instead of 10). 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 master instance) git diff MOODLE_XYZ_STABLE master admin/environment.xml C - Upgrade tests (easier with MDK): Note: Test on master only. No need to test on the other branches. C-1 Using minimum supported version Install Moodle 3.9.0 Uninstall your current instance mdk uninstall -y Checkout the 3.9.0 tag git checkout v3.9.0 Install mdk install Add some courses and one activity or two mdk run makecourse Attempt upgrade to master Checkout the master branch. git checkout master Upgrade either via the browser or via CLI ( mdk upgrade ) VERIFY : that upgrade works C-2 Using older, non-supported version Note: You cannot use Postgres 12 or newer for testing 3.8.0, as it only supports up to Postgres 11. Postgres 12 onwards support was introduced in 3.8.2 ( MDL-67414 ). Install Moodle 3.8.x Uninstall your current instance mdk uninstall -y Checkout the 3.8.0 tag git checkout v3.8.0 Install mdk install Add some courses and one activity or two mdk run makecourse Attempt upgrade to master Checkout the master branch. git checkout master Open the moodle instance on your browser VERIFY : that upgrade is blocked D Verify that the xmlrpc environmental warnings work ok D-0 Requirements Use PHP 7.4 and ensure that the xmlrpc extension is installed. Be able to edit a php file (to avoid having to configure Mnet completely. D-1 Using MOODLE_39_STABLE Install Moodle 3.9.x Go to Admin -> Server -> Environment In the "Moodle version" menu, select all the versions available (3.9.x, 3.10, 3.11, 4.0 and 4.1 upwards). Verify that NONE of them show any warning at the bottom of the page related with xmlrpc. Go to Admin -> Plugins -> Web services -> Manage protocols. Enable the XML-RPC protocol. Go to Admin -> Server -> Environment In the "Moodle version" menu, select all the versions available (3.9.x, 3.10, 3.11, 4.0 and 4.1 upwards). Verify that 3.9.x and 3.10 DON'T SHOW any warning at the bottom of the page related with xmlrpc. Verify that 3.11 and up SHOW a warning with code "xmlrpc_webservice_usage" and text: "It has been detected that the XML-RPC Web Service protocol...." Go to Admin -> Plugins -> Web services -> Manage protocols. Disable the XML-RPC protocol. Go to Admin -> Advanced features Enable Networking and Save changes. Edit the lib/upgradelib.php file. Change the line (near the end) $actualhost = 0; by $actualhost = 1; Go to Admin -> Server -> Environment In the "Moodle version" menu, select all the versions available (3.9.x, 3.10, 3.11, 4.0 and 4.1 upwards). Verify that 3.9.x and 3.10 DON'T SHOW any warning at the bottom of the page related with xmlrpc. Verify that 3.11 and up SHOW a warning with code "xmlrpc_mnet_usage" and text: "It has been detected that the Moodle Networking is enabled on your site...." Change the line back to the original $actualhost = 0; Go to Admin -> Advanced features Enable portfolios and save changes Go to Admin -> Plugins -> Portfolios -> Manage portfolios Edit the lib/upgradelib.php file. Change the line (near the end) if (array_key_exists('mahara', $portfolios)) { by if (!array_key_exists('mahara', $portfolios)) { Go to Admin -> Server -> Environment In the "Moodle version" menu, select all the versions available (3.9.x, 3.10, 3.11, 4.0 and 4.1 upwards). Verify that 3.9.x and 3.10 DON'T SHOW any warning at the bottom of the page related with xmlrpc. Verify that 3.11 and up SHOW a warning with code "xmlrpc_mahara_usage" and text: "It has been detected that the Mahara ePortfolio is enabled..." Change the line back to the original if (array_key_exists('mahara', $portfolios)) { D-2 Using MOODLE_311_STABLE Repeat all the steps in the previous section, only difference is that 3.9.x+ isn't shown there, but the minimum version is 3.11.x+ (so the verifications including 3.9.x and 3.10.x can be ignored). D-3 No tests are needed for 400_STABLE and master, the check already existed there and nothing has been changed.

      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.0 sister issue (MDL-70594).

      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):

      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.

      TODO-1: MDLSITE-6686 : 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.

      TODO-2: Composer: To be done as part of this issue (master only):

      1. Raised lower PHP version do imply that core composer stuff need to be updated and regenerated with it.
      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-3: 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 (master only).

      TODO-4: Travis / GHA integration: To be done as part of this issue (master only): Ensure requirements are fulfilled and there are jobs using the new versions.

      TODO-5: 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 master jobs and CiBoT runs are executed with minimum supported php version.
        • Performance-comparison jobs.

      TODO-6: 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.

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

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

      TODO-9: Once applied upstream, review the travis and/or 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-10: Consider if there is any PHPUnit upgrade to perform whenever there are PHP version changes. (not for now we are already running the latest and greatest phpunit 9.5).

      TODO-11: MDL-74905 : Ensure that the (clone of this) issue for next (to this) requirements issue is created and contains all the information. All the non-resolved details and issues must be dragged to the new issue.

      TODO-12: Docs:

      1. Ensure that all the requirements are shown in the corresponding docs (release and/or upgrade). Ask Community team if the new version docs need to be created.
      2. Ensure that there are landing pages @ docs for all the environmental changes performed.

      TIA and ciao
       

        1. A 4.0.png
          A 4.0.png
          36 kB
        2. A master.png
          A master.png
          37 kB
        3. B Master.png
          B Master.png
          23 kB
        4. c1 master.png
          c1 master.png
          181 kB
        5. c2 3.8.0.png
          c2 3.8.0.png
          55 kB
        6. d1 verify 2.png
          d1 verify 2.png
          27 kB
        7. d1 verify 3.png
          d1 verify 3.png
          60 kB
        8. d1 verify 5.png
          d1 verify 5.png
          58 kB
        9. d1 verify 7.png
          d1 verify 7.png
          57 kB

            stronk7 Eloy Lafuente (stronk7)
            stronk7 Eloy Lafuente (stronk7)
            Sara Arjona (@sarjona) Sara Arjona (@sarjona)
            Jun Pataleta Jun Pataleta
            Stevani Andolo Stevani Andolo
            Votes:
            0 Vote for this issue
            Watchers:
            26 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 day, 1 hour, 30 minutes
                1d 1h 30m

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