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": {
        ...
	}
}
```
main
Carsten Brandt 11 years ago
parent c849f7d05d
commit f538acc4b0

@ -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']);
}

Loading…
Cancel
Save