|
@@ -179,7 +179,15 @@ class ValidatingArrayLoader implements LoaderInterface
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- // TODO validate autoload
|
|
|
+ if ($this->validateArray('autoload') && !empty($this->config['autoload'])) {
|
|
|
+ $types = array('psr-0', 'classmap', 'files');
|
|
|
+ foreach ($this->config['autoload'] as $type => $typeConfig) {
|
|
|
+ if (!in_array($type, $types)) {
|
|
|
+ $this->errors[] = 'autoload : invalid value ('.$type.'), must be one of '.implode(', ', $types);
|
|
|
+ unset($this->config['autoload'][$type]);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
// TODO validate dist
|
|
|
// TODO validate source
|