Manuel:UpdateExtensionJsonSchema.php

This page is a translated version of the page Manual:UpdateExtensionJsonSchema.php and the translation is 100% complete.
Version de MediaWiki :
1.29

Détails

Le fichier updateExtensionJsonSchema.php est un script de maintenance qui convertit un fichier extension.json ou skin.json de manifest_version 1 en manifest_version 2.

Arguments

Argument Description Type
file Chemin du fichier extension.json ou skin.json que vous voulez convertir obligatoire

Utilisation

php maintenance/updateExtensionJsonSchema.php path/to/my/extension.json

Avant :

extensions/CreateUserPage/extension.json
{
	"name": "CreateUserPage",
	"version": "2.0",
	"author": [
		"[https://www.mediawiki.org/wiki/User:Cindy.cicalese Cindy Cicalese]"
	],
	"url": "https://www.mediawiki.org/wiki/Extension:Create_User_Page",
	"descriptionmsg": "createuserpage-desc",
	"license-name": "MIT",
	"type": "other",
	"MessagesDirs": {
		"CreateUserPage": [
			"i18n"
		]
	},
	"AutoloadClasses": {
		"CreateUserPageHooks": "includes/CreateUserPageHooks.php"
	},
	"Hooks": {
		"UserLoginComplete": "CreateUserPageHooks::onUserLoginComplete",
		"OutputPageParserOutput": "CreateUserPageHooks::onOutputPageParserOutput"
	},
	"config": {
		"CreateUserPage_PageContent": "{{User}}",
		"CreateUserPage_OnLogin": true,
		"CreateUserPage_AutoCreateUser": null
	},
	"manifest_version": 1
}
Terminal

Après :

extensions/CreateUserPage/extension.json
{
	"name": "CreateUserPage",
	"version": "2.0",
	"author": [
		"[https://www.mediawiki.org/wiki/User:Cindy.cicalese Cindy Cicalese]"
	],
	"url": "https://www.mediawiki.org/wiki/Extension:Create_User_Page",
	"descriptionmsg": "createuserpage-desc",
	"license-name": "MIT",
	"type": "other",
	"MessagesDirs": {
		"CreateUserPage": [
			"i18n"
		]
	},
	"AutoloadClasses": {
		"CreateUserPageHooks": "includes/CreateUserPageHooks.php"
	},
	"Hooks": {
		"UserLoginComplete": "CreateUserPageHooks::onUserLoginComplete",
		"OutputPageParserOutput": "CreateUserPageHooks::onOutputPageParserOutput"
	},
	"config": {
		"CreateUserPage_PageContent": {
			"value": "{{User}}"
		},
		"CreateUserPage_OnLogin": {
			"value": true
		},
		"CreateUserPage_AutoCreateUser": {
			"value": null
		}
	},
	"manifest_version": 2,
	"requires": {
		"MediaWiki": ">= 1.29.0"
	}
}

Voir aussi