1
0
Fork 0

Merge pull request #155 from webfactory/fix_array_dumper_links

Correctly dump link info
pull/152/merge
Jordi Boggiano 2011-12-12 05:17:24 -08:00
commit 50d4e0606f
1 changed files with 8 additions and 6 deletions

View File

@ -28,12 +28,6 @@ class ArrayDumper
'extra',
'installationSource' => 'installation-source',
'license',
'requires',
'conflicts',
'provides',
'replaces',
'recommends',
'suggests',
'autoload',
'repositories',
);
@ -59,6 +53,14 @@ class ArrayDumper
$data['dist']['shasum'] = $package->getDistSha1Checksum();
}
foreach (array('require', 'conflict', 'provide', 'replace', 'suggest', 'recommend') as $linkType) {
if ($links = $package->{'get'.ucfirst($linkType).'s'}()) {
foreach ($links as $link) {
$data[$linkType][$link->getTarget()] = $link->getPrettyConstraint();
}
}
}
foreach ($keys as $method => $key) {
if (is_numeric($method)) {
$method = $key;