Sort outstanding tasks by filename

This commit is contained in:
Phill Sparks 2012-01-21 13:34:45 +00:00
parent 9bcbe6a357
commit 1ecadb826c
1 changed files with 8 additions and 0 deletions

View File

@ -127,6 +127,14 @@ protected function resolve($migrations)
$instances[] = compact('bundle', 'name', 'migration');
}
// At this point the migrations are only sorted within their
// bundles so we need to re-sort them by name to ensure they
// are in a consistent order.
usort($migrations, function($a, $b)
{
return strcmp($a['name'], $b['name']);
});
return $instances;
}