jenkins-bot has submitted this change and it was merged.
Change subject: Check MW version requires before manifest_version
......................................................................
Check MW version requires before manifest_version
Bug: T149751
Change-Id: I914be4da431dcd613bdf2d1fd5ba9f28cf5b936b
---
M includes/registration/ExtensionRegistry.php
1 file changed, 16 insertions(+), 12 deletions(-)
Approvals:
Paladox: Looks good to me, but someone else must approve
Florianschmidtwelzow: Looks good to me, approved
jenkins-bot: Verified
diff --git a/includes/registration/ExtensionRegistry.php
b/includes/registration/ExtensionRegistry.php
index 0236ea2..b5c70e9 100644
--- a/includes/registration/ExtensionRegistry.php
+++ b/includes/registration/ExtensionRegistry.php
@@ -187,18 +187,7 @@
if ( !is_array( $info ) ) {
throw new Exception( "$path is not a valid JSON
file." );
}
- if ( !isset( $info['manifest_version'] ) ) {
- // For backwards-compatability, assume a
version of 1
- $info['manifest_version'] = 1;
- }
- $version = $info['manifest_version'];
- if ( $version < self::OLDEST_MANIFEST_VERSION ||
$version > self::MANIFEST_VERSION ) {
- throw new Exception( "$path: unsupported
manifest_version: {$version}" );
- }
- $autoload = $this->processAutoLoader( dirname( $path ),
$info );
- // Set up the autoloader now so custom processors will
work
- $GLOBALS['wgAutoloadClasses'] += $autoload;
- $autoloadClasses += $autoload;
+
// Check any constraints against MediaWiki core
$requires = $processor->getRequirements( $info );
if ( isset( $requires[self::MEDIAWIKI_CORE] )
@@ -210,6 +199,21 @@
. '.';
continue;
}
+
+ if ( !isset( $info['manifest_version'] ) ) {
+ // For backwards-compatability, assume a
version of 1
+ $info['manifest_version'] = 1;
+ }
+ $version = $info['manifest_version'];
+ if ( $version < self::OLDEST_MANIFEST_VERSION ||
$version > self::MANIFEST_VERSION ) {
+ throw new Exception( "$path: unsupported
manifest_version: {$version}" );
+ }
+
+ $autoload = $this->processAutoLoader( dirname( $path ),
$info );
+ // Set up the autoloader now so custom processors will
work
+ $GLOBALS['wgAutoloadClasses'] += $autoload;
+ $autoloadClasses += $autoload;
+
// Get extra paths for later inclusion
$autoloaderPaths = array_merge( $autoloaderPaths,
$processor->getExtraAutoloaderPaths( dirname(
$path ), $info ) );
--
To view, visit https://gerrit.wikimedia.org/r/319244
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I914be4da431dcd613bdf2d1fd5ba9f28cf5b936b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Reedy <[email protected]>
Gerrit-Reviewer: Florianschmidtwelzow <[email protected]>
Gerrit-Reviewer: Legoktm <[email protected]>
Gerrit-Reviewer: Paladox <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits