composer/composer — pull request #1177 by sandermarechal (2012-10-03 14:05:19+00:00)
Title: Allow setting stream context options

These changes allow setting stream context options in a repository definition. This allows all kinds of nifty things, like hosting composer repositories on SSH, using SSL client certificates.

Example: Hosting private composer repository on SSH (requires SSH2 PECL extension)
```
{
"repositories": [
{
"type": "composer",
"url": "ssh2.sftp://myserver:22/path/to/packages.json",
"options": {
"ssh2": {
"username": "composer",
"pubkey_file": "/path/to/composer.key.pub",
"privkey_file": "/path/to/composer.key"
}
}
}
]
}
```

Example: SSL client certificate
```
{
"repositories": [
{
"type": "composer",
"url": "https://myserver",
"options": {
"ssl": { "local_cert": "/path/to/composer.pem" }
}
}
]
}
```

This also fixes #777