Convert vocabularies into configuration.
function taxonomy_update_8005() {
$uuid = new Uuid();
$result = db_query('SELECT * FROM {taxonomy_vocabulary}');
foreach ($result as $vocabulary) {
$config = config('taxonomy.vocabulary.' . $vocabulary->machine_name)
->set('vid', $vocabulary->machine_name)
->set('name', $vocabulary->name)
->set('uuid', !empty($vocabulary->uuid) ? $vocabulary->uuid : $uuid
->generate())
->set('description', $vocabulary->description)
->set('hierarchy', $vocabulary->hierarchy)
->set('weight', $vocabulary->weight)
->set('langcode', $vocabulary->langcode)
->save();
}
}