function serialization_update_8302

Add serialization.settings::bc_primitives_as_strings configuration.

File

core/modules/serialization/serialization.install, line 42

Code

function serialization_update_8302() {
  $config_factory = \Drupal::configFactory();
  $config_factory->getEditable('serialization.settings')
    ->set('bc_primitives_as_strings', FALSE)
    ->save(TRUE);
  return t('The REST API will no longer output all values as strings. Integers/booleans will be used where appropriate. If your site depends on these value being strings, <a href="https://www.drupal.org/node/2837696">read the change record to learn how to enable the BC mode.</a>');
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.