From f538acc4b06b06ac2309c26b196e1941c4d30766 Mon Sep 17 00:00:00 2001 From: Carsten Brandt Date: Wed, 30 Oct 2013 17:46:35 +0100 Subject: [PATCH] added support for file:// url to repository file:// is valid url even if it does not define a host. allows to define a repo like this (local directory generated with composer/satis): ```json { "repositories": [ { "type": "composer", "url": "file:///home/cebe/dev/jescali/xeno-core/core/repo" } ], "require": { ... } } ``` --- src/Composer/Repository/ComposerRepository.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Composer/Repository/ComposerRepository.php b/src/Composer/Repository/ComposerRepository.php index 5eab777a4..47b4b94d7 100644 --- a/src/Composer/Repository/ComposerRepository.php +++ b/src/Composer/Repository/ComposerRepository.php @@ -63,7 +63,7 @@ class ComposerRepository extends ArrayRepository implements StreamableRepository } $urlBits = parse_url($repoConfig['url']); - if (empty($urlBits['scheme']) || empty($urlBits['host'])) { + if ($urlBits === false || empty($urlBits['scheme'])) { throw new \UnexpectedValueException('Invalid url given for Composer repository: '.$repoConfig['url']); }