From 9ba05057517fcf01b30d97f085ede38d0c13d27a Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Mon, 20 Feb 2012 12:35:03 +0100 Subject: [PATCH] Make sure lock file is sorted, fixes #276 --- src/Composer/Package/Locker.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Composer/Package/Locker.php b/src/Composer/Package/Locker.php index 24aafae8f..c55c0e467 100644 --- a/src/Composer/Package/Locker.php +++ b/src/Composer/Package/Locker.php @@ -129,6 +129,9 @@ class Locker $lock['packages'][] = $spec; } + usort($lock['packages'], function ($a, $b) { + return strcmp($a['package'], $b['package']); + }); $this->lockFile->write($lock); }