1
0
Fork 0

Ensure dev packages have a source

pull/329/head
Jordi Boggiano 2012-02-19 12:05:09 +01:00
parent 88b018068c
commit d7350b66d5
2 changed files with 3 additions and 1 deletions

View File

@ -122,6 +122,8 @@ class ArrayLoader
$package->setSourceType($config['source']['type']); $package->setSourceType($config['source']['type']);
$package->setSourceUrl($config['source']['url']); $package->setSourceUrl($config['source']['url']);
$package->setSourceReference($config['source']['reference']); $package->setSourceReference($config['source']['reference']);
} elseif ($package->isDev()) {
throw new \UnexpectedValueException('Dev package '.$package.' must have a source specified');
} }
if (isset($config['dist'])) { if (isset($config['dist'])) {

View File

@ -38,7 +38,7 @@ class RootPackageLoader extends ArrayLoader
$config['name'] = '__root__'; $config['name'] = '__root__';
} }
if (!isset($config['version'])) { if (!isset($config['version'])) {
$config['version'] = '1.0.0-dev'; $config['version'] = '1.0.0';
} }
$package = parent::load($config); $package = parent::load($config);