Change record status: 
Project: 
Introduced in branch: 
8.2.x
Introduced in version: 
8.2.0
Description: 

There are cases where Migrate source and destination plugins may need to take special action at various points during the migration process. The only use case in core, introduced in #2485385: Move highwater field support to the source plugin, and do not expose its internals on MigrationInterface, is source plugins needing to clear their stored high-water value after the migration is rolled back.

To facilitate this, two new interfaces have been introduced: \Drupal\migrate\Event\ImportAwareInterface and \Drupal\migrate\Event\RollbackAwareInterface. These interfaces can be implemented by source and destination plugins.

Plugins that implement ImportAwareInterface will have their preImport() method called before import begins, and postImport() after import is completed. Likewise, plugins that implement RollbackAwareInterface will have their preRollback() method called before rollback begins, and postRollback() after rollback is completed.

As of this change, SourcePluginBase implements RollbackAwareInterface. Its preRollback() method is empty, but its postRollback() will clear the stored high-water value for the migration.

Impacts: 
Module developers
Updates Done (doc team, etc.)
Online documentation: 
Not done
Theming guide: 
Not done
Module developer documentation: 
Not done
Examples project: 
Not done
Coder Review: 
Not done
Coder Upgrade: 
Not done
Other: 
Other updates done