Change record status: 
Project: 
Introduced in branch: 
8.7.x
Introduced in version: 
8.7.0
Description: 

Introduced \Drupal\Core\Utility\TableSort class which replaces all functions in tablesort.inc which will be removed in 9.0

Use \Drupal\Core\Utility\TableSort static class and following replacements instead of deprecated functions

Old New
tablesort_init() TableSort::getContextFromRequest()
tablesort_header() TableSort::header()
tablesort_get_query_parameters() TableSort::getQueryParameters()
tablesort_get_order() TableSort::getOrder()
tablesort_get_sort() TableSort::getSort()

Arguments for methods are extended with \Symfony\Component\HttpFoundation\Request $request

Impacts: 
Module developers