Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 314193

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

$
0
0

Problem/Motivation

Discovered in #3444417: "Developer-created components": mark which SDCs should be exposed in XB.

#3364109: Configuration schema & required values: add test coverage for `nullable: true` validation support 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


Viewing all articles
Browse latest Browse all 314193

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>