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

remove unused \core\hook\manager::reset_caches() and fix hook discovery

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Minor
    • 4.3
    • 4.2
    • General
    • MOODLE_402_STABLE
    • MOODLE_403_STABLE
    • Hide

      there are no hooks yet, but you can use examples branch https://github.com/skodak/moodle/commits/MDL-78332-examples

      1. you can try to add new hooks in plugins
      2. you can try to add after_config lib.php callback to some plugin to test deprecation warning
      3. you can remove or fiddle with the mod_book/hooks class to test the discovery agent
      4. you can try to override callbacks via config.php
      Show
      there are no hooks yet, but you can use examples branch https://github.com/skodak/moodle/commits/MDL-78332-examples you can try to add new hooks in plugins you can try to add after_config lib.php callback to some plugin to test deprecation warning you can remove or fiddle with the mod_book/hooks class to test the discovery agent you can try to override callbacks via config.php

    Description

      • This is a leftover after removed functionality, we should better remove it to not confuse developers and to prevent abuse later on.
      • While at it we could also use is_subclass_of() instead of reflection.
      • There were several problems in hook discovery code.
      • Some PHPDocs have outdated information.

      Attachments

        1. mod_book extra hooks.png
          mod_book extra hooks.png
          1.55 MB
        2. mod_book removed some hook types.png
          mod_book removed some hook types.png
          1.65 MB
        3. mod_forum hook.png
          mod_forum hook.png
          1.33 MB
        4. mod_forum hook override.png
          mod_forum hook override.png
          1.58 MB
        5. mod_forum hook override UI.png
          mod_forum hook override UI.png
          1.66 MB

        Issue Links

          Activity

            People

              skodak Petr Skoda (Inactive)
              skodak Petr Skoda (Inactive)
              Farhan Karmali Farhan Karmali
              Andrew Lyons Andrew Lyons
              Andrew Lyons Andrew Lyons
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

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

                  Clockify

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