By leolandotan on
Change record status:
Published (View all published change records)
Project:
Introduced in branch:
11.3.x
Introduced in version:
11.3.0
Issue links:
Description:
hook_ranking() has been deprecated in Drupal 11.3
The hook has been renamed to hook_node_search_ranking(), and it works exactly the same. Until Drupal 12, both hooks will be supported.
Before
<?php
/**
* Implements hook_ranking().
*/
#[Hook('ranking')]
public function ranking(): array {
...
}
?>
After
<?php
/**
* Implements hook_node_search_ranking().
*/
#[Hook('node_search_ranking')]
public function ranking(): array {
// Same function body as before; just change the function name.
}
?>
Impacts:
Module developers