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:
parent
39c09d5192
commit
c0aad84d8b
2 changed files with 23 additions and 0 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue