Move container rebuild to configuration subscriber

Created on 29 November 2023, 12 months ago
Updated 23 April 2024, 7 months ago

Problem/Motivation

Submitting the form, or changing configuration manually via import or Drush, does not always update the service container with the proper CORS configuration.

\Drupal\cors_ui\Form\CorsConfigurationForm::submitForm only invokes container rebuild using a loose equals ==. This should be moved to an event subscriber on config change so that the container is reliably rebuilt on changes.

Steps to reproduce

Modify config locally
Deploy config using config management
Don't use drush cr

Proposed resolution

Add an event subscriber for ConfigEvents::SAVE and rebuild the container if cors_ui.configuration is saved.

Remaining tasks

User interface changes

None

API changes

New event subscriber

Data model changes

None

✨ Feature request
Status

Fixed

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States mglaman WI, USA

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024