X-Git-Url: https://yaffs.net/gitweb/?a=blobdiff_plain;ds=inline;f=web%2Fcore%2Fmodules%2Fmigrate%2Fsrc%2FPlugin%2FMigrationPluginManager.php;h=6d364e77fc565600dc6ed4a6d864cae19206efa8;hb=1c1cb0980bfa6caf0c24cce671b6bb541dc87583;hp=dde8a9f0a0b18fb6adf4adc7d5e45e0aa6b4b094;hpb=9424afc6c1f518c301bf87a23c047d1873435d05;p=yaffs-website diff --git a/web/core/modules/migrate/src/Plugin/MigrationPluginManager.php b/web/core/modules/migrate/src/Plugin/MigrationPluginManager.php index dde8a9f0a..6d364e77f 100644 --- a/web/core/modules/migrate/src/Plugin/MigrationPluginManager.php +++ b/web/core/modules/migrate/src/Plugin/MigrationPluginManager.php @@ -208,7 +208,14 @@ class MigrationPluginManager extends DefaultPluginManager implements MigrationPl $migration->set('requirements', $required_dependency_graph[$migration_id]['paths']); } } - array_multisort($weights, SORT_DESC, SORT_NUMERIC, $migrations); + // Sort weights, labels, and keys in the same order as each other. + array_multisort( + // Use the numerical weight as the primary sort. + $weights, SORT_DESC, SORT_NUMERIC, + // When migrations have the same weight, sort them alphabetically by ID. + array_keys($migrations), SORT_ASC, SORT_NATURAL, + $migrations + ); return $migrations; }