Problem/Motivation
In Synchrony (a Drupal distribution), we primarily use content_sync to import/export fixture content. This works very well for us.
However, we've recently introduced a hook_entity_insert() that automatically creates entities that reference the entity being inserted. This ends up creating duplicates.
Our current solution is to detect when we're in Drush, and bail out of the hook. But we'd prefer to take a more targeted approach.
Proposed resolution
Introduce an Event on start of content import.
For our use-case, this would allow us to create a listener for said event, to set a global variable (or similar) that we could check in our hook.
Comments