1
0
Fork 0

Bail out if root package attempts to include itself.

pull/4838/head
Niels Keurentjes 2016-01-26 23:39:39 +01:00
parent 593b88e414
commit a48159b283
1 changed files with 3 additions and 0 deletions

View File

@ -113,6 +113,9 @@ 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']));
$realPackage->setAliases($aliases);
$realPackage->setStabilityFlags($stabilityFlags);
$realPackage->setReferences($references);