Remove validation for now since it's doing more harm than good
parent
7d4e67b335
commit
b3fe30200b
|
@ -41,10 +41,8 @@ class ArrayLoader
|
||||||
|
|
||||||
public function load($config)
|
public function load($config)
|
||||||
{
|
{
|
||||||
$this->validateConfig($config);
|
$version = $this->versionParser->normalize(isset($config['version']) ? $config['version'] : '0.0.0');
|
||||||
|
$package = new Package\MemoryPackage(isset($config['name']) ? $config['name'] : '__app__', $version);
|
||||||
$version = $this->versionParser->normalize($config['version']);
|
|
||||||
$package = new Package\MemoryPackage($config['name'], $version);
|
|
||||||
|
|
||||||
$package->setType(isset($config['type']) ? $config['type'] : 'library');
|
$package->setType(isset($config['type']) ? $config['type'] : 'library');
|
||||||
|
|
||||||
|
@ -108,14 +106,4 @@ class ArrayLoader
|
||||||
|
|
||||||
return $links;
|
return $links;
|
||||||
}
|
}
|
||||||
|
|
||||||
private function validateConfig(array $config)
|
|
||||||
{
|
|
||||||
if (!isset($config['name'])) {
|
|
||||||
throw new \UnexpectedValueException('name is required for package');
|
|
||||||
}
|
|
||||||
if (!isset($config['version'])) {
|
|
||||||
throw new \UnexpectedValueException('version is required for package');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue