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

mod/data/classes/template.php php81 problem

XMLWordPrintable

    • MOODLE_402_STABLE
    • MOODLE_402_STABLE
    • Hide

      Ensure the following passes (without warnings/risky tests) on PHP8.1:

      $ bin/moodle-docker-compose exec webserver php vendor/bin/phpunit mod/data/tests/externallib_test.php --filter test_get_entries
      Moodle 4.2dev (Build: 20230203)
      Php: 8.1.14, mysqli: 5.7.41, OS: Linux 4.15.0-202-generic x86_64
      PHPUnit 9.5.26 by Sebastian Bergmann and contributors.
       
      .                                                                   1 / 1 (100%)
       
      Time: 00:02.810, Memory: 68.50 MB
       
      OK (1 test, 69 assertions)
      

      Show
      Ensure the following passes (without warnings/risky tests) on PHP8.1: $ bin/moodle-docker-compose exec webserver php vendor/bin/phpunit mod/data/tests/externallib_test.php --filter test_get_entries Moodle 4.2dev (Build: 20230203) Php: 8.1.14, mysqli: 5.7.41, OS: Linux 4.15.0-202-generic x86_64 PHPUnit 9.5.26 by Sebastian Bergmann and contributors.   . 1 / 1 (100%)   Time: 00:02.810, Memory: 68.50 MB   OK (1 test, 69 assertions)

      We are getting this deprecation warning with PHP 8.1:

      PHP Deprecated:  Optional parameter $entryid declared before required parameter $field is implicitly treated as a required parameter in /var/www/html/mod/data/classes/template.php on line 976
      

      And its causing both PHPUnit and Behat to fail/be marked as risky:

      Recording for posterity the source of those timezone errors:

      1. https://github.com/php/php-src/issues/10218
      2. https://github.com/php/php-src/commit/d12ba111e03fa4e6d76a66a029f5dbe6265b1ea9
      3. https://www.php.net/ChangeLog-8.php#8.1.15

        Fixed bug GH-10218 (DateTimeZone fails to parse time zones that contain the "+" character).
        

            pholden Paul Holden
            stronk7 Eloy Lafuente (stronk7)
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            Andrew Lyons Andrew Lyons
            Kim Jared Lucas Kim Jared Lucas
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 36 minutes
                36m

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