X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fregistration%2FExtensionRegistry.php;h=d14a5eeeb1f4cc3453e753f1bd8a4718ac1fe780;hb=ad2a5758de8754b6d0026dea9e442f4cc1c85ee9;hp=994de9726f01802baca04e7682badeda62135a37;hpb=6bd1e23f4a281b05e6c171653a715c394aac36d6;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/registration/ExtensionRegistry.php b/includes/registration/ExtensionRegistry.php index 994de9726f..d14a5eeeb1 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 */ @@ -291,7 +298,7 @@ class ExtensionRegistry { // Optimistic: If the global is not set, or is an empty array, replace it entirely. // Will be O(1) performance. - if ( !isset( $GLOBALS[$key] ) || ( is_array( $GLOBALS[$key] ) && !$GLOBALS[$key] ) ) { + if ( !array_key_exists( $key, $GLOBALS ) || ( is_array( $GLOBALS[$key] ) && !$GLOBALS[$key] ) ) { $GLOBALS[$key] = $val; continue; } @@ -323,7 +330,7 @@ class ExtensionRegistry { } if ( isset( $info['autoloaderNS'] ) ) { - Autoloader::$psr4Namespaces += $info['autoloaderNS']; + AutoLoader::$psr4Namespaces += $info['autoloaderNS']; } foreach ( $info['defines'] as $name => $val ) { @@ -399,16 +406,6 @@ class ExtensionRegistry { return $this->loaded; } - /** - * Mark a thing as loaded - * - * @param string $name - * @param array $credits - */ - protected function markLoaded( $name, array $credits ) { - $this->loaded[$name] = $credits; - } - /** * Fully expand autoloader paths *