Change record status: 
Project: 
Introduced in branch: 
8.x
Introduced in version: 
8.0
Description: 

Following years of hard work to convert all Drupal 7 style variables to the Drupal 8 configuration system and state systems, the variable_get()/variable_set() and variable_del() API is now fully removed. The variable subsystem was in place for so long to support settings not yet converted to the new configuration system but that process is now complete. The old variable_* API was removed in favor of two new systems. You should review the Overview of Configuration (vs. other types of information) to determine what system is the best successor for your Drupal 7 variable.

State system

If the data you used to tuck into variable_* is derived from other data and/or temporary in nature, you should use the State API to store it.

Configuration system

To learn more about the new configuration API, see the Configuration API in Drupal 8 section of the Drupal 8 API documentation. See the basics for getting/setting/removing configuration values on the Simple configuration API page.

This change removed

  • The DRUPAL_BOOTSTRAP_VARIABLES bootstrap phase
  • variable_initialize()
  • variable_get()
  • variable_set()
  • variable_del()
  • The $new_phase parameter of drupal_bootstrap()
  • The {variable} database table
  • _drupal_bootstrap_variables()
Impacts: 
Module developers
Updates Done (doc team, etc.)
Online documentation: 
Not done
Theming guide: 
Not done
Module developer documentation: 
Not done
Examples project: 
Not done
Coder Review: 
Not done
Coder Upgrade: 
Not done
Other: 
Other updates done