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

Created on 10 June 2024, 5 months ago
Updated 17 July 2024, 4 months ago

Problem/Motivation

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

πŸ“Œ 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.71.5 2024