diff --git a/src/Composer/Composer.php b/src/Composer/Composer.php index 0dc19e150..914c1c156 100644 --- a/src/Composer/Composer.php +++ b/src/Composer/Composer.php @@ -33,11 +33,13 @@ class Composer public function addDownloader($type, $downloader) { + $type = strtolower($type); $this->downloaders[$type] = $downloader; } public function getDownloader($type) { + $type = strtolower($type); if (!isset($this->downloaders[$type])) { throw new \UnexpectedValueException('Unknown source type: '.$type); } @@ -46,11 +48,13 @@ class Composer public function addInstaller($type, $installer) { + $type = strtolower($type); $this->installers[$type] = $installer; } public function getInstaller($type) { + $type = strtolower($type); if (!isset($this->installers[$type])) { throw new \UnexpectedValueException('Unknown dependency type: '.$type); } diff --git a/src/Composer/Package/BasePackage.php b/src/Composer/Package/BasePackage.php index f02c0ee40..dd31490b0 100644 --- a/src/Composer/Package/BasePackage.php +++ b/src/Composer/Package/BasePackage.php @@ -34,7 +34,7 @@ abstract class BasePackage implements PackageInterface */ public function __construct($name) { - $this->name = $name; + $this->name = strtolower($name); $this->id = -1; } diff --git a/src/Composer/Package/Link.php b/src/Composer/Package/Link.php index e80cfb592..16718a55b 100644 --- a/src/Composer/Package/Link.php +++ b/src/Composer/Package/Link.php @@ -36,8 +36,8 @@ class Link */ public function __construct($source, $target, LinkConstraintInterface $constraint = null, $description = 'relates to') { - $this->source = $source; - $this->target = $target; + $this->source = strtolower($source); + $this->target = strtolower($target); $this->constraint = $constraint; $this->description = $description; }