Browse Source

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

Validate RSS channel in composer schema
Rob 9 năm trước cách đây
mục cha
commit
a0f722a707

+ 1 - 1
src/Composer/Package/Loader/ValidatingArrayLoader.php

@@ -122,7 +122,7 @@ class ValidatingArrayLoader implements LoaderInterface
         }
 
         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])) {
                     $this->errors[] = 'support.'.$key.' : invalid value, must be a string';
                     unset($this->config['support'][$key]);

+ 1 - 0
tests/Composer/Test/Package/Loader/ValidatingArrayLoaderTest.php

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