Problem/Motivation
It currently generates a Migration config entity with the following keys: id, migration_tags, label, source, destination, process, migration_dependencies.
That means several are missing: class, field_plugin_method, cck_plugin_method.
Proposed resolution
\Drupal\migrate_upgrade\MigrateUpgradeDrushRunner::export() is much more complete. Port the relevant additions from there.
- Every key listed in the annotations
config_export needs to be handled by ::createEntityFromPlugin(). Document this.
Remaining tasks
User interface changes
API changes
Data model changes
Release notes snippet
Comments
Comment #2
wim leersComment #3
wim leersComment #4
wim leersComment #5
heddnCould we add a trigger_error on cck? I want to be able to remove it at some point from the definition. Hmm, I want to remove it in 5.x of migrate plus since that will be the version that goes stable for core 9. Maybe don't add it at all?
Comment #6
wim leersWFM — since
cck_plugin_methodhas been removed from Drupal 9 already 🥳Comment #7
wim leersComment #8
heddnWould it make sense to add any test coverage of this? Otherwise, WFM.
Comment #9
wim leersWriting test coverage for this is theoretically possible, but it's disproportionately much effort compared to the fix I think. I pledge to file a patch against
migrate_upgradeonce this lands, to make it use this, which … was the original but never executed upon intent of #2736911: Provide convenience functions for creating entities from plugins 😅Comment #12
heddnComment #13
wim leersWoah, that was fast! 🥳
As pledged in #9: #3100489: Use rather than duplicate \Drupal\migrate_plus\Entity\Migration::createEntityFromPlugin() in \Drupal\migrate_upgrade\MigrateUpgradeDrushRunner::export().