1
0
Fork 0
mirror of https://github.com/composer/composer synced 2025-05-11 09:32:55 +00:00

Validation to make the combination of target-dir with psr-4 illegal.

This commit is contained in:
Andreas Hennings 2013-12-14 16:33:59 +01:00
parent 39c09d5192
commit c0aad84d8b
2 changed files with 23 additions and 0 deletions

View file

@ -189,6 +189,13 @@ class ValidatingArrayLoader implements LoaderInterface
}
}
if (!empty($this->config['autoload']['psr-4']) && !empty($this->config['target-dir'])) {
$this->errors[] = "The ['autoload']['psr-4'] setting is incompatible with the ['target-dir'] setting.";
// Unset the psr-4 setting, since unsetting target-dir might
// interfere with other settings.
unset($this->config['autoload']['psr-4']);
}
// TODO validate dist
// TODO validate source