Config entity types MUST allow NULL value for any config entity PHP class property corresponding to config entity property

Created on 10 June 2024, 19 days ago
Updated 17 June 2024, 11 days ago

Problem/Motivation

Discovered in πŸ“Œ "Developer-created components": mark which SDCs should be exposed in XB Active .

πŸ“Œ Configuration schema & required values: add test coverage for `nullable: true` validation support Fixed added ConfigEntityValidationTestBase::testRequiredPropertyValuesMissing().

One of the things it does:

…
    foreach ($config_entity_properties as $property) {
…
      $this->entity = clone $original_entity;
      $this->entity->set($property, NULL);

πŸ‘† This fails if your config entity's PHP class has a class prop (corresponding to a config entity prop) that is strictly typed:

  protected string $label;

rather than the historically typical:

  /**
    * @var string
    */
  protected $label;

This should be supported, but the base test makes that impossible.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

πŸ› Bug report
Status

Needs work

Version

11.0 πŸ”₯

Component
Configuration entityΒ  β†’

Last updated about 14 hours ago

Created by

πŸ‡§πŸ‡ͺBelgium Wim Leers Ghent πŸ‡§πŸ‡ͺπŸ‡ͺπŸ‡Ί

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

Merge Requests

Comments & Activities

Production build 0.69.0 2024