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

As a part of #1802750: [Meta] Convert configurable data to ConfigEntity system

The {taxonomy_vocabulary} table is deprecated in favor of a new taxonomy_vocabulary config entity, but the table is preserved in installations upgraded from earlier versions of Drupal to allow contrib modules to migrate their data.

The vid column the {taxonomy_term_data} table is changed:

D7 {taxonomy_term_data}.vid D8 {taxonomy_term_data}.vid
<?php
'vid' => array(
 
'type' => 'int',
 
'unsigned' => TRUE,
 
'not null' => TRUE,
 
'default' => 0,
?>
<?php
'vid' => array(
 
'type' => 'varchar',
 
'length' => 255,
 
'not null' => TRUE,
 
'default' => '',
?>

Functions removed:

  • taxonomy_vocabulary_machine_name_load() use entity_load('taxonomy_vocabulary', $vid)
  • views argument and filter for machine_name, use vid instead

To access a vocabulary's base properties use class methods $vocabulary->id() and $vocabulary->label()

<?php
// D7 code
$vocabulary = taxonomy_vocabulary_machine_name_load('forums');
$options[$vocabulary->vid] = $vocabulary->name;
?>

<?php
// D8 code
$vocabulary = entity_load('taxonomy_vocabulary', 'forums');
$options[$vocabulary->id()] = $vocabulary->label();
?>
Impacts: 
Site builders, administrators, editors
Module developers
Themers
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