/**
* 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
*/
// 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;
}
}
if ( isset( $info['autoloaderNS'] ) ) {
- Autoloader::$psr4Namespaces += $info['autoloaderNS'];
+ AutoLoader::$psr4Namespaces += $info['autoloaderNS'];
}
foreach ( $info['defines'] as $name => $val ) {
* Fully expand autoloader paths
*
* @param string $dir
- * @param array $info
+ * @param array $files
* @return array
*/
- protected function processAutoLoader( $dir, array $info ) {
+ protected function processAutoLoader( $dir, array $files ) {
// Make paths absolute, relative to the JSON file
- return array_map( function ( $file ) use ( $dir ) {
- return "$dir/$file";
- }, $info );
+ foreach ( $files as &$file ) {
+ $file = "$dir/$file";
+ }
+ return $files;
}
}