1
0
Fork 0

Add warning when loading an https repo if openssl is disabled, refs #930

pull/934/head
Jordi Boggiano 2012-07-20 10:27:02 +02:00
parent 8bf03aea07
commit 2d41774bcc
1 changed files with 4 additions and 0 deletions

View File

@ -82,6 +82,10 @@ class ComposerRepository extends ArrayRepository implements NotifiableRepository
{
parent::initialize();
if (!extension_loaded('openssl') && 'https' === substr($this->url, 0, 5)) {
throw new \RuntimeException('You must enable the openssl extension in your php.ini to load information from '.$this->url);
}
try {
$json = new JsonFile($this->url.'/packages.json', new RemoteFilesystem($this->io));
$data = $json->read();