From: Umherirrender Date: Fri, 2 Feb 2018 22:19:43 +0000 (+0100) Subject: convertExtensionToRegistration: Set requires key in extension.json X-Git-Tag: 1.31.0-rc.0~702 X-Git-Url: http://git.cyclocoop.org/%22%20.%20generer_url_ecrire%28%22auteur_infos%22%2C%20%22id_auteur=%24id%22%29%20.%20%22?a=commitdiff_plain;ds=sidebyside;h=0483765086760f604dc72cab6302d42e786b99b9;p=lhc%2Fweb%2Fwiklou.git convertExtensionToRegistration: Set requires key in extension.json The highest manifest version is not supported from the start of extension.json For extensions converted to this highest version the mininum core version must be specified to avoid load problems in the extension. Using 1.29.0 for manifest version 2 due to T149757 / Id1071fc0647892438e5cd0e3ee621fbdaaa64014 Change-Id: Iea5ba589c70958db7500cf3587b5ebd738532026 --- diff --git a/includes/registration/ExtensionRegistry.php b/includes/registration/ExtensionRegistry.php index ae1ab58906..bb4c7fd02a 100644 --- a/includes/registration/ExtensionRegistry.php +++ b/includes/registration/ExtensionRegistry.php @@ -20,9 +20,16 @@ class ExtensionRegistry { /** * Version of the highest supported manifest version + * Note: Update MANIFEST_VERSION_MW_VERSION when changing this */ const MANIFEST_VERSION = 2; + /** + * MediaWiki version constraint representing what the current + * highest MANIFEST_VERSION is supported in + */ + const MANIFEST_VERSION_MW_VERSION = '>= 1.29.0'; + /** * Version of the oldest supported manifest version */ diff --git a/maintenance/convertExtensionToRegistration.php b/maintenance/convertExtensionToRegistration.php index 0205311ae1..4ae9558703 100644 --- a/maintenance/convertExtensionToRegistration.php +++ b/maintenance/convertExtensionToRegistration.php @@ -144,6 +144,11 @@ class ConvertExtensionToRegistration extends Maintenance { unset( $this->json[$key] ); } } + // Set a requirement on the MediaWiki version that the current MANIFEST_VERSION + // was introduced in. + $out['requires'] = [ + ExtensionRegistry::MEDIAWIKI_CORE => ExtensionRegistry::MANIFEST_VERSION_MW_VERSION + ]; $out += $this->json; // Put this at the bottom $out['manifest_version'] = ExtensionRegistry::MANIFEST_VERSION;