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.phppull/1177/head
parent
a5eaba805c
commit
4799053ca9
|
@ -37,7 +37,7 @@ class ComposerRepository extends ArrayRepository implements NotifiableRepository
|
||||||
|
|
||||||
public function __construct(array $repoConfig, IOInterface $io, Config $config)
|
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
|
// assume http as the default protocol
|
||||||
$repoConfig['url'] = 'http://'.$repoConfig['url'];
|
$repoConfig['url'] = 'http://'.$repoConfig['url'];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue