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

Make $plugin->component required for all plugins

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide

      The following scenarios should be tested:

      If the currently installed plugin misses $plugin->component in its version.php, debugging warning is raised at least at the Plugins overview page. This can be easily tested by commenting out the line in any of the currently installed plugin (do not forget to purge caches after changing the version.php contents).
      When attempting to install a plugin without component defined in version.php via the admin UI, the plugin validation must fail and the plugin is not installed.
      When attempting to install a plugin without component defined in version.php via direct extraction of the ZIP (i.e. bypassing the validation), the installation process must fail and end with exception thrown.

      Thanks for your time!

      Show
      The following scenarios should be tested: If the currently installed plugin misses $plugin->component in its version.php, debugging warning is raised at least at the Plugins overview page. This can be easily tested by commenting out the line in any of the currently installed plugin (do not forget to purge caches after changing the version.php contents). When attempting to install a plugin without component defined in version.php via the admin UI, the plugin validation must fail and the plugin is not installed. When attempting to install a plugin without component defined in version.php via direct extraction of the ZIP (i.e. bypassing the validation), the installation process must fail and end with exception thrown. Thanks for your time!
    • Affected Branches:
      MOODLE_28_STABLE
    • Fixed Branches:
      MOODLE_30_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-48494-master-component

      Description

      To help the diagnosis and auto-detection (in Moodle core - MDL-48493 - and in the Plugins directory), it would help to make the $plugin->component required at some point. Moodle 3.0 looks like a reasonable candidate.

      The syntax has been supported and recommended since Moodle 2.0 (MDL-26035, 3e858ea737739197809013636d0ed942131ffb3e) so it's been there long enough to give plugin maintainers time to include it (and recent plugin submissions all have it).

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  16/Nov/15