Move requirement checking into validation constraint

Created on 10 September 2024, 4 months ago

Overview

Currently checking whether SDC meets requirements happens in Drupal\experience_builder\Plugin\ComponentPluginManager::setCachedDefinitions(). This makes it possible to create via code or config import Component entities for SDC's that do not meet the requirements of Experience Builder.

Proposed resolution

Create validation constraint, something akin to Drupal\Core\Config\Plugin\Validation\Constraint\LangcodeRequiredIfTranslatableValuesConstraintValidator. Move the validation logic from Drupal\experience_builder\Plugin\ComponentPluginManager::setCachedDefinitions() to the new validation constraint. Ensure the reasons for SDC failing to meet requirements are handled and are still surfaced in the UI at /admin/structure/component/status

๐Ÿ“Œ Task
Status

Active

Component

Config management

Created by

๐Ÿ‡ฌ๐Ÿ‡งUnited Kingdom f.mazeikis Brighton

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