1
0
Fork 0

Detect require overrides, fixes #2503

pull/2524/merge
Jordi Boggiano 2013-12-26 12:30:12 +01:00
parent 3f3dc4f32b
commit 4ae5c95c8d
1 changed files with 5 additions and 0 deletions

View File

@ -108,6 +108,11 @@ class ConfigValidator
$warnings[] = "The package type 'composer-installer' is deprecated. Please distribute your custom installers as plugins from now on. See http://getcomposer.org/doc/articles/plugins.md for plugin documentation.";
}
$requireOverrides = array_intersect_key($manifest['require'], $manifest['require-dev']);
if (!empty($requireOverrides)) {
$warnings[] = implode(', ', array_keys($requireOverrides)). " is required both in require and require-dev, this can lead to unexpected behavior";
}
try {
$loader = new ValidatingArrayLoader(new ArrayLoader());
if (!isset($manifest['version'])) {