Note: Since this change record was created, the way variables are upgraded to the new configuration management system has changed, and much of the information on this page is outdated. See: Migration API in core and Drupal 7 sites can no longer be upgraded to Drupal 8 with update.php.
The Drupal 7 variable system was converted to a completely different Configuration Management system in Drupal 8. A separate change notice describes how this system works:
The "Level 3: Configuration API" section of that change notice describes how to retrieve the configuration object for a particular configuration object name, and how to get/set a particular configuration key's information within that configuration object (the equivalents of variable_get()/variable_set()).
The present change notice was started as an attempt to list all of the configuration variables in Drupal 7.x Core and how they map to Drupal 8.x configuration objects and keys. However, there are a lot of these variables, and the complete list has not yet been made.
How to find this information
In case the list of variable equivalents between 7.x and 8.x is incomplete, here are instructions on how to find this information:
- The actual conversion from variables to configuration system was accomplished in hook_update_N() functions via calls to update_variables_to_config()
- Here is the list of calls to update_variables_to_config()
- Each call looks something like this example from the Field module:
'field_storage_default' => 'default_storage',
'field_language_fallback' => 'language_fallback',
- The first argument is the configuration object that is used to store the configuration in Drupal 8.x. The second argument is an array mapping old variable names to new configuration keys. So this example tells us that the 7.x variable 'field_storage_default' is mapped into 8.x configuration object 'field.settings' using key 'default_storage', and 7.x variable 'field_language_fallback' uses key 'language_fallback'.
- These equivalents have been added to the Field module section in the table below.
- Assuming that the table below is still incomplete, the best way to find the equivalents for a particular variable would be to download Drupal 8.x and use your favorite tool (grep, IDE, etc.) to search the 8.x code base for the 7.x variable name. This should lead you to the update function that updated it (like the above example for the Field module).
List of Variables [incomplete]
Please keep this table in alphabetical order, by module, then by variable name.
|Drupal 7 Variable||Drupal 8 Configuration Object Name||Drupal 8 Configuration Key|