1
0
Fork 0

Type is not mandatory

pull/19/head
Jordi Boggiano 2011-09-21 23:03:35 +02:00
parent c67d8ee2a3
commit cd80f22781
1 changed files with 1 additions and 4 deletions

View File

@ -36,7 +36,7 @@ class ArrayLoader
$version = $versionParser->parse($config['version']); $version = $versionParser->parse($config['version']);
$package = new Package\MemoryPackage($config['name'], $version['version'], $version['type']); $package = new Package\MemoryPackage($config['name'], $version['version'], $version['type']);
$package->setType($config['type']); $package->setType(isset($config['type']) ? $config['type'] : 'library');
if (isset($config['extra'])) { if (isset($config['extra'])) {
$package->setExtra($config['extra']); $package->setExtra($config['extra']);
@ -107,9 +107,6 @@ class ArrayLoader
if (!isset($config['name'])) { if (!isset($config['name'])) {
throw new \UnexpectedValueException('name is required for package'); throw new \UnexpectedValueException('name is required for package');
} }
if (!isset($config['type'])) {
throw new \UnexpectedValueException('type is required for package');
}
if (!isset($config['version'])) { if (!isset($config['version'])) {
throw new \UnexpectedValueException('version is required for package'); throw new \UnexpectedValueException('version is required for package');
} }