Do not serialize settings

Created on 7 May 2024, 8 months ago

Problem/Motivation

I think the code comment says it all:

  /**
   * Serialize array values.
   *
   * There must be a better way to do this, but it looks as though trying to
   * save an array-valued plugin setting fails. Our solution is to serialize the
   * settings before saving and unserialize them before using.
   *
   * Serialize $settings[$key] for each $key in $arraySettingsKeys.
   *
   * @param array &$settings
   *   The array of plugin settings.
   *
   * @see settingsUnserialize()
   */
  protected static function settingsSerialize(array &$settings) {

Steps to reproduce

Proposed resolution

Remaining tasks

  1. Read and write settings without serializing them.
  2. Update the configuration schema.
  3. Add an update function.

User interface changes

None

API changes

None

Data model changes

This change affects how settings are stored, so it will need an update function for existing sites.

πŸ“Œ Task
Status

Active

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States benjifisher Boston area

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024