Remove the http protocol from github-protocols, refs #1955

main
Jordi Boggiano 11 years ago
parent a6e3b23ca5
commit e68d455c5c

@ -606,9 +606,10 @@ The following options are supported:
* **preferred-install:** Defaults to `auto` and can be any of `source`, `dist` or
`auto`. This option allows you to set the install method Composer will prefer to
use.
* **github-protocols:** Defaults to `["git", "https", "http"]`. A list of
protocols to use when cloning from github.com, in priority order. Use this if you
are behind a proxy or have somehow bad performances with the git protocol.
* **github-protocols:** Defaults to `["git", "https"]`. A list of protocols to
use when cloning from github.com, in priority order. You can reconfigure it to
prioritize the https protocol if you are behind a proxy or have somehow bad
performances with the git protocol.
* **github-oauth:** A list of domain names and oauth keys. For example using
`{"github.com": "oauthtoken"}` as the value of this option will use `oauthtoken`
to access private repositories on github and to circumvent the low IP-based

@ -297,8 +297,8 @@ EOT
}
foreach ($vals as $val) {
if (!in_array($val, array('git', 'https', 'http'))) {
return 'valid protocols include: git, https, http';
if (!in_array($val, array('git', 'https'))) {
return 'valid protocols include: git, https';
}
}

@ -24,7 +24,7 @@ class Config
'use-include-path' => false,
'preferred-install' => 'auto',
'notify-on-install' => true,
'github-protocols' => array('git', 'https', 'http'),
'github-protocols' => array('git', 'https'),
'vendor-dir' => 'vendor',
'bin-dir' => '{$vendor-dir}/bin',
'cache-dir' => '{$home}/cache',
@ -200,6 +200,13 @@ class Config
return $this->config[$key];
case 'github-protocols':
if (reset($this->config['github-protocols']) === 'http') {
throw new \RuntimeException('The http protocol for github is not available anymore, update your config\'s github-protocols to use "https" or "git"');
}
return $this->config[$key];
default:
if (!isset($this->config[$key])) {
return null;

Loading…
Cancel
Save