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

test_yearly_every_20th_monday_forever failing with PHP 8.0.10

XMLWordPrintable

    • MOODLE_310_STABLE, MOODLE_311_STABLE, MOODLE_39_STABLE, MOODLE_400_STABLE
    • MOODLE_310_STABLE, MOODLE_311_STABLE, MOODLE_39_STABLE
    • MDL-72478-master
      1. Check the GitHub Action is passing for all the branches. With this patch, the error with test_yearly_every_20th_monday_forever in the PHPUnit job for PHP8  (ubuntu-18.04, 8, pgsql, xmlrpc-beta) should not be displayed.
    • Moppies Kanban

      With PHP 8.0.10 we've started getting PHPUnit failures when running the following method:

      1) core_calendar_rrule_manager_testcase::test_yearly_every_20th_monday_forever
      Failed asserting that two strings are equal.
      --- Expected
      +++ Actual
      @@ @@
      -'2022-05-16 18:00:00'
      +'2022-05-16 09:00:00'

       

      Eloy has detected that it's due to some changes done in datetime->modify()

      Before PHP 8.0.10… the time is lost when datetime->modify() is used with weekdays. With PHP 8.0.10… it’s kept. https://3v4l.org/PEFkJ

            sarjona Sara Arjona (@sarjona)
            sarjona Sara Arjona (@sarjona)
            Carlos Escobedo Carlos Escobedo
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

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

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