1
0
Fork 0

Clarified error message and added braces.

pull/4838/head
Niels Keurentjes 2016-01-27 09:09:29 +01:00
parent a48159b283
commit 7b6ccde97a
1 changed files with 4 additions and 2 deletions

View File

@ -113,8 +113,10 @@ class RootPackageLoader extends ArrayLoader
} }
} }
if (isset($links[$config['name']])) if (isset($links[$config['name']])) {
throw new \InvalidArgumentException(sprintf('Root package \'%s\' cannot require itself in its composer.json', $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->setAliases($aliases);
$realPackage->setStabilityFlags($stabilityFlags); $realPackage->setStabilityFlags($stabilityFlags);