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

Add support for PSR-20 (Clock) to allow better time management

XMLWordPrintable

    • 2
    • Team Hedgehog 2024 Sprint 1.2, Team Hedgehog 2024 Sprint 1.3

      This issue proposes pulling PSR-20 (clock) into core, creating a Moodle-specific extension of this (\core\clock interface), and implementing this as \core\system_clock with unit-test clock implementations for:

      • \incrementing_clock
      • \frozen_clock

      Furthermore updating the data generators to use \core\di rather than an instance cache, which thus allows for injection of the clock (and other) classes.

      The DI container is already reset between unit tests.

      It may also be possible to then make use of these data generators in behat tests too.

            dobedobedoh Andrew Lyons
            dobedobedoh Andrew Lyons
            David Woloszyn David Woloszyn
            Huong Nguyen Huong Nguyen
            CiBoT CiBoT
            Votes:
            3 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated:
              Resolved:

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

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