Change record status: 
Project: 
Introduced in branch: 
8.x
Description: 

Several callbacks used for sorting arrays have been changed to be methods on Drupal\Component\Utility\SortArray. For example, drupal_sort_weight() has been replaced by SortArray::sortByWeightElement()

Drupal 7:

uasort($operations, 'drupal_sort_weight');

Drupal 8:

uasort($operations, ['Drupal\Component\Utility\SortArray', 'sortByWeightElement']);
Drupal 7 Drupal 8
drupal_sort_title() SortArray::sortByTitleElement()
drupal_sort_weight() SortArray::sortByWeightElement()
element_sort() SortArray::sortByWeightProperty()
element_sort_by_title() SortArray::sortByTitleProperty()
Impacts: 
Module developers