Support Drupal's configuration override system

Created on 3 November 2023, 8 months ago
Updated 9 November 2023, 8 months ago

Problem/Motivation

Drupal has mechanisms to override configurations: https://www.drupal.org/docs/drupal-apis/configuration-api/configuration-... β†’
However, the charts module is bypassing all those mechanisms by always loading the configuration with the "getEditable()"-method.

Steps to reproduce

Try any of the override mechanisms from the documentation.

Proposed resolution

Use the "config"-service for loading the configuration in all cases where read-only is sufficient, i.e. during rendering and within requirement checks. For example:

-  $config = \Drupal::service('config.factory')->getEditable('charts.settings');
+  $config = \Drupal::config('charts.settings');

User interface changes

None.

API changes

Support for Drupal's configuration override API.
No changes to the existing API of the module.

Data model changes

None.

πŸ› Bug report
Status

Fixed

Version

5.0

Component

Miscellaneous

Created by

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

Comments & Activities

Production build 0.69.0 2024