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.
Problem/Motivation
In D7, Features was used to install some default config for traditionally non-exportable things, like user roles.
These are now config entities.
And Strongarm is used for overriding defaults for variables.
These are now vanilla CMI values.
Proposed resolution
Determine a subset of the core-provided config entities that Features handled, and provide conversions.
A good first example is hook_user_default_roles() to user.role.*.yml.
Reuse the variable_*et upgrade to turn strongarm into CMI.
Remaining tasks
User interface changes
API changes
Comment | File | Size | Author |
---|---|---|---|
#4 | 2375515-dmu-user_roles-4.patch | 7.04 KB | tim.plunkett |
#4 | interdiff.txt | 6.18 KB | tim.plunkett |
Comments
Comment #1
tim.plunkettHere's an example conversion.
Comment #2
tim.plunkettThese two values are required. What should I do if they aren't present? Skip that single role and move on, mark it in some way, or bail out completely?
Also before committing, we should decide if contrib conversions really belong in DMU directly, or if they should be a submodule as part of DMU, or standalone.
Comment #3
phenaproximaContrib conversions should be submodules.
If both values aren't present, I'd recommend skipping that single role, and setting $this->error('Could not convert xyz...') so it shows up in the console.
Comment #4
tim.plunkettWell we can't use a submodule until #2375543: Provide an easy way for modules providing DMU integration to alter what is stored in DMU/config/install (or something like it). Here it is refactored a bit, and with a unit test.