瀏覽代碼

Allow dot in URL scheme

This makes it possible to support SSH2 urls, like ssh2.scp://
See: http://www.php.net/manual/en/wrappers.ssh2.php
Sander Marechal 12 年之前
父節點
當前提交
4799053ca9
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/Composer/Repository/ComposerRepository.php

+ 1 - 1
src/Composer/Repository/ComposerRepository.php

@@ -37,7 +37,7 @@ class ComposerRepository extends ArrayRepository implements NotifiableRepository
 
     public function __construct(array $repoConfig, IOInterface $io, Config $config)
     {
-        if (!preg_match('{^\w+://}', $repoConfig['url'])) {
+        if (!preg_match('{^[\w.]+://}', $repoConfig['url'])) {
             // assume http as the default protocol
             $repoConfig['url'] = 'http://'.$repoConfig['url'];
         }