Merge remote-tracking branch 'chr0n1x/fix-require-dev-warning'
commit
95cbc62520
|
@ -108,9 +108,14 @@ 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.";
|
$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']);
|
// check for require-dev overrides
|
||||||
if (!empty($requireOverrides)) {
|
if (isset($manifest['require']) && isset($manifest['require-dev'])) {
|
||||||
$warnings[] = implode(', ', array_keys($requireOverrides)). " is required both in require and require-dev, this can lead to unexpected behavior";
|
$requireOverrides = array_intersect_key($manifest['require'], $manifest['require-dev']);
|
||||||
|
|
||||||
|
if (!empty($requireOverrides)) {
|
||||||
|
$plural = (count($requireOverrides) > 1) ? 'are' : 'is';
|
||||||
|
$warnings[] = implode(', ', array_keys($requireOverrides)). " {$plural} required both in require and require-dev, this can lead to unexpected behavior";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
Loading…
Reference in New Issue