Change record status: 
Project: 
Introduced in branch: 
9.3.x
Introduced in version: 
9.3.0
Description: 

The entity migration destination plugin allows migration developers to enable entity validation during execution of the migration. See the original change record for more information about migration entity validation.

Previously, an entity could fail validation if this feature was enabled because the user executing the migration may not have permission to set a particular field value even though the user who originally authored the source entity did have that permission. This is often the case when using the command line via Drush since Drupal's default user is anonymous. For example, if the anonymous user is not allowed to user a particular text format, but the source entity uses it on a text field, the imported entity will fail validation because the format is not valid for the anonymous user.

After this change was introduced, the migrate system will temporarily switch the current user account to the entity's owner before validating, it if the entity object implements the EntityOwnerInterface. This temporary account switching requires the account_switcher service. Therefore, any migration plugins which extend the Drupal\migrate\Plugin\migrate\destination\EntityContentBase class, or its derivatives, will require the account_switcher service to be passed into their constructors in Drupal 10.

Impacts: 
Module developers