Closed (fixed)
Project:
Migrate Plus
Component:
Miscellaneous
Priority:
Normal
Category:
Task
Assigned:
Reporter:
Created:
19 Mar 2015 at 14:54 UTC
Updated:
22 Jun 2015 at 15:34 UTC
Jump to comment: Most recent, Most recent file
When/if #2302307: Support shared configuration between migrate groups lands, support migration groups - use them in the example, and have the drush commands make use of them.
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | support_migration_groups-2455575-6.patch | 12.83 KB | mikeryan |
| #6 | interdiff.txt | 6.01 KB | mikeryan |
Comments
Comment #1
mikeryanAttached patch depends on the core patch at #2302307: Support shared configuration between migrate groups. It adds a migration group for the beer example, and makes the migrate-status and migrate-import drush commands group-aware.
Comment #2
mikeryanPatch updated to work with latest core patch at https://www.drupal.org/node/2302307#comment-9796695
Comment #3
mikeryanPer #2302307: Support shared configuration between migrate groups, we're going to pull the MigrationGroup class itself into migrate_plus for now.
Comment #4
mikeryanHere's the patch, including the basic group support itself. Bit of a problem though - because we need to add the ability to merge shared configuration into migrations, we need to extend the MigrationStorage class, which we do with a hook_entity_type_alter() (to replace migrate's own MigrationStorage with our own). The problem is, migrate_drupal is also replacing MigrationStorage with its own version (improperly, I believe: #2499173: migrate_drupal highjacks the Migration and MigrationStorage classes) - this means that you can't have both migrate_drupal and migrate_plus enabled without one breaking the other. In particular, it means incorporating group support into migrate_upgrade, which is a major POC for getting the groups into core (where they won't need the alter hook), won't work. Chicken, meet egg...
Comment #5
mikeryanDigging a bit deeper, maybe we can do hook_migration_load() instead of extending doLoadMultiple() to merge our configuration. And maybe migrate_drupal can use the hook as well... I hate resorting to hooks in an object-oriented design (separating code from its class context), but it may be necessary in this case.
Comment #6
mikeryanYep, that works. It's fine with me to use the hook here, it won't be necessary when this goes into core because we'll put the configuration merge code directly into Migrate's MigrationStorage.
Comment #8
mikeryanDone!