Problem/Motivation

There is a deprecated hook called hook_ranking() and line of code that invokes it in \Drupal\node\Plugin\Search\NodeSearch::getRankings(). We should clean it up.

Proposed resolution

Remove the hook and the code that invokes it in favor of the new hook.

Remaining tasks

  1. In the core/modules/node/node.api.php file, remove the documentation block and the hook_ranking() function.
  2. In \Drupal\node\Plugin\Search\NodeSearch::getRankings(), remove the line of code invoking the old hook.
  3. In \Drupal\node\Plugin\Search\NodeSearch::getRankings(), change the implementation of invoking the new hook from an array addition to just a simple value assignment. From the "+=" assignment operation to just "=".

User interface changes

None.

API changes

hook_ranking() is deprecated in favor of hook_node_search_ranking() and needs to be removed.

Data model changes

None.

Comments

leolando.tan created an issue. See original summary.

jhodgdon’s picture

Adding related issue. I'll also edit the change record so it references this issue.

catch’s picture

Status: Active » Closed (duplicate)

Version: 9.x-dev » 9.0.x-dev

The 9.0.x branch will open for development soon, and the placeholder 9.x branch should no longer be used. Only issues that require a new major version should be filed against 9.0.x (for example, removing deprecated code or updating dependency major versions). New developments and disruptive changes that are allowed in a minor version should be filed against 8.9.x, and significant new features will be moved to 9.1.x at committer discretion. For more information see the Allowed changes during the Drupal 8 and 9 release cycles and the Drupal 9.0.0 release plan.