dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge "Revert "Log the reason why revision->getContent() returns null""
[lhc/web/wiklou.git]
/
includes
/
registration
/
ExtensionRegistry.php
diff --git
a/includes/registration/ExtensionRegistry.php
b/includes/registration/ExtensionRegistry.php
index
994de97
..
1876645
100644
(file)
--- a/
includes/registration/ExtensionRegistry.php
+++ b/
includes/registration/ExtensionRegistry.php
@@
-20,9
+20,16
@@
class ExtensionRegistry {
/**
* Version of the highest supported manifest version
/**
* Version of the highest supported manifest version
+ * Note: Update MANIFEST_VERSION_MW_VERSION when changing this
*/
const MANIFEST_VERSION = 2;
*/
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
*/
/**
* Version of the oldest supported manifest version
*/
@@
-75,6
+82,7
@@
class ExtensionRegistry {
private static $instance;
/**
private static $instance;
/**
+ * @codeCoverageIgnore
* @return ExtensionRegistry
*/
public static function getInstance() {
* @return ExtensionRegistry
*/
public static function getInstance() {
@@
-98,9
+106,11
@@
class ExtensionRegistry {
} else {
throw new Exception( "$path does not exist!" );
}
} else {
throw new Exception( "$path does not exist!" );
}
+ // @codeCoverageIgnoreStart
if ( !$mtime ) {
$err = error_get_last();
throw new Exception( "Couldn't stat $path: {$err['message']}" );
if ( !$mtime ) {
$err = error_get_last();
throw new Exception( "Couldn't stat $path: {$err['message']}" );
+ // @codeCoverageIgnoreEnd
}
}
$this->queued[$path] = $mtime;
}
}
$this->queued[$path] = $mtime;
@@
-291,7
+301,7
@@
class ExtensionRegistry {
// Optimistic: If the global is not set, or is an empty array, replace it entirely.
// Will be O(1) performance.
// 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;
}
$GLOBALS[$key] = $val;
continue;
}
@@
-323,7
+333,7
@@
class ExtensionRegistry {
}
if ( isset( $info['autoloaderNS'] ) ) {
}
if ( isset( $info['autoloaderNS'] ) ) {
- Auto
l
oader::$psr4Namespaces += $info['autoloaderNS'];
+ Auto
L
oader::$psr4Namespaces += $info['autoloaderNS'];
}
foreach ( $info['defines'] as $name => $val ) {
}
foreach ( $info['defines'] as $name => $val ) {
@@
-399,16
+409,6
@@
class ExtensionRegistry {
return $this->loaded;
}
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
*
/**
* Fully expand autoloader paths
*