StaticPropSource::parse() could validate prop value keys

Created on 27 March 2025, 6 days ago

Overview

In 📌 Split model values into resolved and raw Active we discovered that we have tests that store garbage data in prop values, and this was not detected:

    $static_image_prop_source = [
      'sourceType' => 'static:field_item:entity_reference',
      'value' => [
        'alt' => 'This is a random image.',
        'width' => 100,
        'height' => 100,
        'target_id' => 3,
      ],

Only target_id is actually required here.

StaticPropSource::parse() could assert that only the required keys are in the array, alerting developers to the fact unused data is present.

Proposed resolution

User interface changes

📌 Task
Status

Active

Version

0.0

Component

Shape matching

Created by

🇬🇧United Kingdom longwave UK

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

Comments & Activities

Production build 0.71.5 2024