FieldConfigBase::getConstraint and DataDefinition::getConstraint violate DataDefinitionInterface::getConstraint

Created on 16 February 2023, almost 2 years ago
Updated 9 May 2023, over 1 year ago

Problem/Motivation

DataDefinitionInterface:;getConstraint promises that it will only return array. However, FieldConfigBase::getConstraint and DataDefinition::getConstraint actually return array|null, violating the inteface.

Steps to reproduce

Proposed resolution

Change the interface's documented return type to array|null to match the reality of Drupal (it seems like the lesser breaking change).

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

πŸ› Bug report
Status

Active

Version

11.0 πŸ”₯

Component
Typed dataΒ  β†’

Last updated 16 days ago

  • Maintained by
  • πŸ‡¦πŸ‡ΉAustria @fago
Created by

πŸ‡³πŸ‡±Netherlands kingdutch

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

Comments & Activities

Production build 0.71.5 2024