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

Plugins check PHP 8.1 problem

XMLWordPrintable

    • MOODLE_401_STABLE
    • MOODLE_401_STABLE
    • MDL-77430_401
    • Hide

      Notes

      1. All the tests must be done with PHP 8.1
      2. The need to be performed with both MOODLE_401_STABLE and master.
      3. The test require modifying code (a little bit) and removing some plugins.
      4. DEBUG DEVELOPER and display errors have to be enabled.
        • If using MDK, run "mdk run mindev"
      5. Also web server error logs at hand.
        • You can use the tail command... e.g. "tail -f /path/to/apache2/error.log". On Ubuntu, the path to the error log is usually in /var/log/apache2/error.log

      Before the patch (without the changes applied). Reproduce the problem.

      1. Install a Moodle site from moodle.git repository. With defaults everywhere.
      2. Manually, remove a couple of plugins from code (for example the admin/tool/dbtransfer and the filter/urltolink ones).
      3. Edit version.php and change the last digit of the $version variable. For example:

        -$version  = 2023022400.00;              // YYYYMMDD      = weekly release date of this DEV branch.
        +$version  = 2023022400.01;              // YYYYMMDD      = weekly release date of this DEV branch.
        

      4. Logged in as admin visit http://your_site_url/admin/index.php
      5. Verify that you're in a "Upgrading Moodle database from version..." page.
      6. Press "continue" until you arrive to the "Plugins check" page.
      7. Verify that the "Plugins check" page shows the 2 removed plugins as "Missing from disk!"
      8. Verify that, in the page OR on the web server error logs you've got the 2 "PHP Deprecated" warnings in the description of the issue.

      After the patch (with the changes). Confirm the fix.

      1. Simply ensure that now you're using the patched code in the same site (switch to integration.git repository).
      2. Also, check that the plugins removed in the previous section as of point #2 continue removed (remove them again if needed to). And that the version.php $version variable continues being incremented as of point #3 of previous section.
      3. Reload the browser (F5).
      4. Verify that the "Plugins check" page shows the 2 removed plugins as "Missing from disk!"
      5. Verify that, in the page OR on the web server error logs you don't get any "PHP Deprecated" warnings any more.
      Show
      Notes All the tests must be done with PHP 8.1 The need to be performed with both MOODLE_401_STABLE and master. The test require modifying code (a little bit) and removing some plugins. DEBUG DEVELOPER and display errors have to be enabled. If using MDK, run " mdk run mindev " Also web server error logs at hand. You can use the tail command... e.g. " tail -f /path/to/apache2/error.log ". On Ubuntu, the path to the error log is usually in /var/log/apache2/error.log Before the patch (without the changes applied). Reproduce the problem. Install a Moodle site from moodle.git repository. With defaults everywhere. Manually, remove a couple of plugins from code (for example the admin/tool/dbtransfer and the filter/urltolink ones). Edit version.php and change the last digit of the $version variable. For example: -$version = 2023022400.00; // YYYYMMDD = weekly release date of this DEV branch. +$version = 2023022400.01; // YYYYMMDD = weekly release date of this DEV branch. Logged in as admin visit http://your_site_url/admin/index.php Verify that you're in a "Upgrading Moodle database from version..." page. Press "continue" until you arrive to the "Plugins check" page. Verify that the "Plugins check" page shows the 2 removed plugins as "Missing from disk!" Verify that, in the page OR on the web server error logs you've got the 2 "PHP Deprecated" warnings in the description of the issue. After the patch (with the changes). Confirm the fix. Simply ensure that now you're using the patched code in the same site (switch to integration.git repository). Also, check that the plugins removed in the previous section as of point #2 continue removed (remove them again if needed to). And that the version.php $version variable continues being incremented as of point #3 of previous section. Reload the browser (F5). Verify that the "Plugins check" page shows the 2 removed plugins as "Missing from disk!" Verify that, in the page OR on the web server error logs you don't get any "PHP Deprecated" warnings any more.

      We are getting this deprecation warning with PHP 8.1:

      Deprecated: dirname(): Passing null to parameter #1 ($path) of type string is deprecated in /lib/classes/plugin_manager.php on line 1654

      and

      Deprecated: substr(): Passing null to parameter #1 ($string) of type string is deprecated in /lib/classes/plugininfo/base.php on line 601

            stronk7 Eloy Lafuente (stronk7)
            huongn@moodle.com Huong Nguyen
            Andrew Lyons Andrew Lyons
            Jun Pataleta Jun Pataleta
            Kim Jared Lucas Kim Jared Lucas
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 3 hours, 20 minutes
                3h 20m

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