Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By quietone on
Change record status:
Published (View all published change records)
Project:
Introduced in branch:
8.4.x
Introduced in version:
8.4.1
Issue links:
Description:
When migrating a content entity, any null source property will now be migrated to the corresponding destination property as NULL. Previously, only non-null source properties were migrated. It's now possible to explicitly designate a destination property as empty, which will cause it to be NULL in the migrated entity. This is done with a new method on \Drupal\migrate\Row:
$row->setEmptyDestinationProperty('foo');
This will set the 'foo' destination property explicitly to NULL in the destination content entity.
Impacts:
Module developers