Problem/Motivation
In the Drupal 7 contrib migrate module, there was a "system-of-record" concept. By default migrating into an existing content item completely replaces it with source data (system-of-record == SOURCE). In D7, setting the system-of-record to DESTINATION allowed you to selectively import only particular fields from the source, leaving other fields (which may have been manually modified on the destination side) unmolested. APIs for the system-of-record support (getSystemOfRecord(), setSystemOfRecord()) got carried forward into D8 but were never actually used - instead, we implemented an overwrite_properties property on destination plugins which achieves the same goal more cleanly. The vestigial system-of-record stuff should be removed.
Proposed resolution
- Remove getSystemOfRecord() and setSystemOfRecord() from MigrationInterface and Migration.
- Remove the SOURCE and DESTINATION constants from MigrationInterface.
- Remove the protected $systemOfRecord property from Migration.
Remaining tasks
Do it.
User interface changes
N/A
API changes
getSystemOfRecord() and setSystemOfRecord() removed from the interface. Since these are never actually used anywhere, and it's highly likely anyone is implementing MigrationInterface other than via the existing Migration plugin class, the likely impact of removing them is zero.
Data model changes
None.
| Comment | File | Size | Author |
|---|---|---|---|
| #9 | 2801851-9.patch | 2.82 KB | yogeshmpawar |
| #2 | 2801851-2.patch | 2.82 KB | shashikant_chauhan |
Comments
Comment #2
shashikant_chauhan commentedAdding patch.
Comment #3
naveenvalechaThis needs CR
Comment #4
shashikant_chauhan commentedI have added the Change record. Kindly review.
Comment #5
phenaproximaChange record updated to mention the closest Drupal 8 equivalent to the system-of-record stuff.
This is most definitely a BC break, though, since we're changing MigrationInterface and any custom implementation of it will now break. Marking as such, but otherwise this is RTBC in my opinion. We'll have to discuss with the committers if it's kosher to make a change like this now, but since Migrate is still experimental we may have a shot.
Comment #7
phenaproximaComment #8
phenaproximaThis is not RC-eligible, so it should be rerolled against 8.3.x.
Comment #9
yogeshmpawarI have rerolled the patch against 8.3.x
Comment #10
yogeshmpawarComment #11
phenaproximaLooks great!
Comment #12
alexpottCommitted and pushed 6416f45 to 8.3.x and ea5c39e to 8.2.x. Thanks!
Added to 8.2.0 since migrate is experimental.