Merge pull request #5347 from markatom/rss-support-validation

Validate RSS channel in composer schema
main
Rob 8 years ago
commit a0f722a707

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

@ -69,6 +69,7 @@ class ValidatingArrayLoaderTest extends \PHPUnit_Framework_TestCase
'wiki' => 'http://example.org/', 'wiki' => 'http://example.org/',
'source' => 'http://example.org/', 'source' => 'http://example.org/',
'irc' => 'irc://example.org/example', 'irc' => 'irc://example.org/example',
'rss' => 'http://example.org/rss',
), ),
'require' => array( 'require' => array(
'a/b' => '1.*', 'a/b' => '1.*',

Loading…
Cancel
Save