MDL-59562 upgrade: Plugins can declare supported moodle versions
author[Peter Burnett] <[peterburnett@catalyst-au.net]>
Wed, 25 Sep 2019 05:51:21 +0000 (15:51 +1000)
committerPeter Burnett <peterburnett@catalyst-au.net>
Wed, 15 Jan 2020 04:38:27 +0000 (14:38 +1000)
commit147a895ad0425bea580c9e544ac49b992cb49590
treee42cc584c3a2b064b7084bbaf2fcf88287a52ea7
parentc55402486bfefe81a1c102f36158de17e1dacd12
MDL-59562 upgrade: Plugins can declare supported moodle versions

* Plugins can now explicitly declare supported and incompatible Moodle
  versions in version.php
  - $plugin->supported[37,39];
    supported takes an array of ascending numbers, that correspond to a
    range of branch numbers of supported versions, inclusive. Moodle
    versions that are outside of this range will produce a message
    notifying at install time, but will allow for installation.

  - $plugin->incompatible = 36;
    incompatible takes a single int corresponding to the first incompatible
    branch. Any Moodle versions including and below this will be prevented
    from installing the plugin, and a message will be given when
    attempting installation.
13 files changed:
admin/cli/upgrade.php
admin/index.php
admin/renderer.php
lang/en/error.php
lang/en/plugin.php
lib/classes/plugin_manager.php
lib/classes/plugininfo/base.php
lib/tests/fixtures/testable_plugin_manager.php
lib/tests/fixtures/testable_plugininfo_base.php
lib/tests/plugin_manager_test.php
lib/tests/plugininfo/base_test.php [new file with mode: 0644]
lib/upgrade.txt
lib/upgradelib.php