Change record status: 
Project: 
Introduced in branch: 
8.x-1.x
Introduced in version: 
8.x-1.40
Description: 

In contrast to all other plugin types that are provided by the Search API module, trackers did not have a useful base class to inherit from: TrackerPluginBase was completely empty, while the default Basic tracker plugin had a complete implementation of a DB-based tracking system.

This was now flipped completely: The entire class body of the \Drupal\search_api\Plugin\search_api\tracker\Basic class was moved to \Drupal\search_api\Tracker\TrackerPluginBase, which now provides a complete implementation of a DB-based tracker by default.

This change only affects custom tracker plugin implementations:

  • In case the tracker plugin previously inherited from Basic to provide a DB-based tracker with slightly different internals, it can now inherit from TrackerPluginBase as soon as the code depends on a version of the Search API that includes this change. If both older and newer versions of the Search API need to be supported, the plugin class can keep inheriting from Basic.
  • In case the tracker plugin previously inherited from TrackerPluginBase to provide a tracker implementation that does not use the database, or is too dissimilar to the Basic plugin for inheritance from it to make sense, the plugin should now inherit from \Drupal\search_api\Plugin\IndexPluginBase instead and manually implement \Drupal\search_api\Tracker\TrackerInterface. (See \Drupal\search_api_test\Plugin\search_api\tracker\TestTracker for an example.)
Impacts: 
Module developers