add docs to support section in composer schema, closes #4055

Note that this does not yet add this attribute @ packagist though
main
Rob Bast 9 years ago
parent 69210d5bc1
commit 95dbb6d9db

@ -235,11 +235,12 @@ Various information to get support about the project.
Support information includes the following:
* **email:** Email address for support.
* **issues:** URL to the Issue Tracker.
* **forum:** URL to the Forum.
* **wiki:** URL to the Wiki.
* **issues:** URL to the issue tracker.
* **forum:** URL to the forum.
* **wiki:** URL to the wiki.
* **irc:** IRC channel for support, as irc://server/channel.
* **source:** URL to browse or download the sources.
* **docs:** URL to the documentation.
An example:

@ -390,17 +390,17 @@
},
"issues": {
"type": "string",
"description": "URL to the Issue Tracker.",
"description": "URL to the issue tracker.",
"format": "uri"
},
"forum": {
"type": "string",
"description": "URL to the Forum.",
"description": "URL to the forum.",
"format": "uri"
},
"wiki": {
"type": "string",
"description": "URL to the Wiki.",
"description": "URL to the wiki.",
"format": "uri"
},
"irc": {
@ -412,6 +412,11 @@
"type": "string",
"description": "URL to browse or download the sources.",
"format": "uri"
},
"docs": {
"type": "string",
"description": "URL to the documentation.",
"format": "uri"
}
}
},

@ -121,7 +121,7 @@ class ValidatingArrayLoader implements LoaderInterface
}
if ($this->validateArray('support') && !empty($this->config['support'])) {
foreach (array('issues', 'forum', 'wiki', 'source', 'email', 'irc') as $key) {
foreach (array('issues', 'forum', 'wiki', 'source', 'email', 'irc', 'docs') as $key) {
if (isset($this->config['support'][$key]) && !is_string($this->config['support'][$key])) {
$this->errors[] = 'support.'.$key.' : invalid value, must be a string';
unset($this->config['support'][$key]);
@ -138,7 +138,7 @@ class ValidatingArrayLoader implements LoaderInterface
unset($this->config['support']['irc']);
}
foreach (array('issues', 'forum', 'wiki', 'source') as $key) {
foreach (array('issues', 'forum', 'wiki', 'source', 'docs') as $key) {
if (isset($this->config['support'][$key]) && !$this->filterUrl($this->config['support'][$key])) {
$this->warnings[] = 'support.'.$key.' : invalid value ('.$this->config['support'][$key].'), must be an http/https URL';
unset($this->config['support'][$key]);

Loading…
Cancel
Save