registration: Add suggested dependencies to extension.json schema

For now, this is not used by MediaWiki core itself, but in the future
we may add prompts in the installer and notes in update.php, amongst
other places.

The naming is taken from the `suggests` field as used by Composer.

Bug: T182472
Change-Id: Icc8c189812b231313e6d8b3e907a866c710bae24
This commit is contained in:
Reedy 2020-04-22 15:55:08 +01:00 committed by Krinkle
parent b778b72bf9
commit c5fe40ae9d
2 changed files with 76 additions and 0 deletions

View file

@ -95,6 +95,44 @@
}
}
},
"suggests": {
"type": "object",
"description": "Indicates what versions of PHP and MediaWiki extensions or skins are optional suggestions. This syntax may be extended in the future, for example to check dependencies between other services.",
"additionalProperties": false,
"properties": {
"platform": {
"type": "object",
"description": "Indicates optional version constraints against platform services.",
"additionalProperties": false,
"properties": {
"php": {
"type": "string",
"description": "Optional version constraint string against PHP."
},
"ability-shell": {
"type": "boolean",
"default": false,
"description": "Whether this extension requires shell access."
}
},
"patternProperties": {
"^ext-": {
"type": "string",
"description": "Optional PHP extension.",
"enum": ["*"]
}
}
},
"extensions": {
"type": "object",
"description": "Set of optional version constraint strings against specific extensions."
},
"skins": {
"type": "object",
"description": "Set of optional version constraint strings against specific skins."
}
}
},
"dev-requires": {
"type": "object",
"description": "Indicates what dependencies are required for development purposes such as running tests. This syntax may be extended in the future.",

View file

@ -105,6 +105,44 @@
}
}
},
"suggests": {
"type": "object",
"description": "Indicates what versions of PHP and MediaWiki extensions or skins are optional suggestions. This syntax may be extended in the future, for example to check dependencies between other services.",
"additionalProperties": false,
"properties": {
"platform": {
"type": "object",
"description": "Indicates optional version constraints against platform services.",
"additionalProperties": false,
"properties": {
"php": {
"type": "string",
"description": "Optional version constraint string against PHP."
},
"ability-shell": {
"type": "boolean",
"default": false,
"description": "Whether this extension requires shell access."
}
},
"patternProperties": {
"^ext-": {
"type": "string",
"description": "Optional PHP extension.",
"enum": ["*"]
}
}
},
"extensions": {
"type": "object",
"description": "Set of optional version constraint strings against specific extensions."
},
"skins": {
"type": "object",
"description": "Set of optional version constraint strings against specific skins."
}
}
},
"dev-requires": {
"type": "object",
"description": "Indicates what dependencies are required for development purposes such as running tests. This syntax may be extended in the future.",