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 "site: Make getPageUrl consistently return null"
[lhc/web/wiklou.git]
/
maintenance
/
updateExtensionJsonSchema.php
diff --git
a/maintenance/updateExtensionJsonSchema.php
b/maintenance/updateExtensionJsonSchema.php
index
6233d5b
..
18c71a3
100644
(file)
--- a/
maintenance/updateExtensionJsonSchema.php
+++ b/
maintenance/updateExtensionJsonSchema.php
@@
-18,7
+18,7
@@
class UpdateExtensionJsonSchema extends Maintenance {
}
$json = FormatJson::decode( file_get_contents( $filename ), true );
}
$json = FormatJson::decode( file_get_contents( $filename ), true );
- if (
$json === null
) {
+ if (
!is_array( $json )
) {
$this->fatalError( "Error: Invalid JSON" );
}
$this->fatalError( "Error: Invalid JSON" );
}
@@
-34,6
+34,7
@@
class UpdateExtensionJsonSchema extends Maintenance {
while ( $json['manifest_version'] !== ExtensionRegistry::MANIFEST_VERSION ) {
$json['manifest_version'] += 1;
$func = "updateTo{$json['manifest_version']}";
while ( $json['manifest_version'] !== ExtensionRegistry::MANIFEST_VERSION ) {
$json['manifest_version'] += 1;
$func = "updateTo{$json['manifest_version']}";
+ // @phan-suppress-next-line PhanUndeclaredMethod
$this->$func( $json );
}
$this->$func( $json );
}
@@
-59,6
+60,13
@@
class UpdateExtensionJsonSchema extends Maintenance {
$json['config'][$name]['merge_strategy'] = $value[ExtensionRegistry::MERGE_STRATEGY];
unset( $value[ExtensionRegistry::MERGE_STRATEGY] );
}
$json['config'][$name]['merge_strategy'] = $value[ExtensionRegistry::MERGE_STRATEGY];
unset( $value[ExtensionRegistry::MERGE_STRATEGY] );
}
+ if ( isset( $config["@$name"] ) ) {
+ // Put 'description' first for better human-legibility.
+ $json['config'][$name] = array_merge(
+ [ 'description' => $config["@$name"] ],
+ $json['config'][$name]
+ );
+ }
}
}
}
}
}
}