1
0
Fork 0

Sort vendor/composer/installed.json deterministically

Just like composer.lock, sort installed.json in order of the package
names. This makes it easier to review diffs when this file is changed.
pull/6696/head
Kunal Mehta 2017-09-19 18:26:38 -07:00
parent edece864e7
commit 2a38417653
1 changed files with 4 additions and 0 deletions

View File

@ -83,6 +83,10 @@ class FilesystemRepository extends WritableArrayRepository
$data[] = $dumper->dump($package);
}
usort($data, function($a, $b) {
return strcmp($a['name'], $b['name']);
});
$this->file->write($data);
}
}