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.
@@ -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);