Clarified error message and added braces.
parent
a48159b283
commit
7b6ccde97a
|
@ -113,8 +113,10 @@ class RootPackageLoader extends ArrayLoader
|
|||
}
|
||||
}
|
||||
|
||||
if (isset($links[$config['name']]))
|
||||
throw new \InvalidArgumentException(sprintf('Root package \'%s\' cannot require itself in its composer.json', $config['name']));
|
||||
if (isset($links[$config['name']])) {
|
||||
throw new \InvalidArgumentException(sprintf('Root package \'%s\' cannot require itself in its composer.json' . PHP_EOL .
|
||||
'Did you accidentally name your root package after an external package?', $config['name']));
|
||||
}
|
||||
|
||||
$realPackage->setAliases($aliases);
|
||||
$realPackage->setStabilityFlags($stabilityFlags);
|
||||
|
|
Loading…
Reference in New Issue