Issue #2226811 by mohit_aghera, catch, Désiré, guilhermevp: FieldItemBase type hints DataDefinitionInterface but requires ComplexDataDefinitionInterface

merge-requests/871/head
effulgentsia 2021-06-29 16:25:07 -07:00
parent e182007f0b
commit 893e3799a9
1 changed files with 2 additions and 2 deletions

View File

@ -4,7 +4,7 @@ namespace Drupal\Core\Field;
use Drupal\Core\Entity\EntityInterface;
use Drupal\Core\Form\FormStateInterface;
use Drupal\Core\TypedData\DataDefinitionInterface;
use Drupal\Core\TypedData\ComplexDataDefinitionInterface;
use Drupal\Core\TypedData\Plugin\DataType\Map;
use Drupal\Core\TypedData\TypedDataInterface;
@ -43,7 +43,7 @@ abstract class FieldItemBase extends Map implements FieldItemInterface {
/**
* {@inheritdoc}
*/
public function __construct(DataDefinitionInterface $definition, $name = NULL, TypedDataInterface $parent = NULL) {
public function __construct(ComplexDataDefinitionInterface $definition, $name = NULL, TypedDataInterface $parent = NULL) {
parent::__construct($definition, $name, $parent);
// Initialize computed properties by default, such that they get cloned
// with the whole item.