1
0
Fork 0

Remove validation for now since it's doing more harm than good

pull/48/head
Jordi Boggiano 2011-10-02 23:54:13 +02:00
parent 7d4e67b335
commit b3fe30200b
1 changed files with 2 additions and 14 deletions

View File

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