Remaining D6 issues
#2130593: Write a special process plugin for variable to config: system.date Assigned to: fastangel
#2132217: Variable to config: user.settings Assigned to: remydenton
- Find an Active, unassigned "Variable to config:" issue
- Assign it to yourself when you start work on it
- Convert it, write a test and submit
To elaborate:
- Your guidelines are config/migrate.migration.d6_system_site.yml, lib/Drupal/migrate/Tests/MigrateSystemConfigsTest.php, lib/Drupal/migrate/Tests/Dump/Drupal6SystemSite.php
- Copy paste the update_variables_to_config call into the provided converter script and run it from your Drupal root. It will create the migration entity for you.
- Create your Dump class based on the source variables and any values you like. It's preferred to use the default values for the variables from D6 but if that's too much work, we are good with any values.
- If your module does not already have a MigrateModuleNameConfigsTest.php, create it. Now add a method for this specific config file based on the testSystemSite method which should be self explanatory: you need to change the second argument of the entity_load to the id found in the yaml (both file name and inside as id:), the dump path, the name of the config() and all the asserts.
Note that the test you are writing is a simpletest; full integration tests can't be done in phpunit (or not well). To execute simpletests from the command line, see https://drupal.org/node/645286
Note #2: our only guide in these migration is the update_variables_to_config call. However, some variables didn't exist in D6 or had a different name. For these, please use the D6 variable name and leave a note on the issue that there are D7 variables to be ported. After commit I will set them to postponed and add a D7 to the issue title.
| Comment | File | Size | Author |
|---|---|---|---|
| #23 | convert.php_.txt | 624 bytes | chx |
Comments
Comment #1
chx commentedComment #2
chx commentedComment #3
chx commentedComment #4
chx commentedComment #5
chx commentedComment #6
chx commentedComment #7
chx commentedComment #8
chx commentedUpdated the script for the from-to swap as agreed with Mike Ryan.
Comment #9
chx commentedComment #10
chx commentedUpdated the script for the new, past pivot reality.
Comment #11
eliza411 commentedComment #12
chx commentedComment #13
eliza411 commentedComment #14
chx commentedComment #15
xjmI dumped a bit from the summary into https://drupal.org/node/1429136. Can someone polish it and make it make sense, and maybe look into writing more generalized docs for migration tests?
Comment #16
chx commentedComment #17
eliza411 commentedComment #18
eliza411 commentedMoving to the core queue to consolidate issues now that we're doing all the work there.
Comment #19
xjmI keep confusing this issue with the CMI issue so clarifying title. :)
Comment #20
chx commentedI deem this fixed.
Comment #21
xjmThere are still variables in core, and an open child issue?
Comment #22
eliza411 commentedUpdating to highlight remaining issues
Comment #23
chx commentedComment #24
hass commentedI have no differences in variable names bettwen D6 and D7. Is it correct that D7 variables migration is 1:1 copy of D6 and the only change is the name of "id:" e.g.
<strong>d7</strong>_google_analytics_settingsunder source we useplugin: drupal6_variablefor D7 migration, too? Or is there any specialdrupal7_variableplugin?Comment #25
chx commentedThe d6_variable plugin has been renamed recently to variable and it is used equally in d6 and d7 migrations. Hope that helps.
Comment #26
benjy commentedNow #2121299: Migrate in Core: Drupal 6 to Drupal 8 is in this can be closed.