Issue #2226811 by mohit_aghera, catch, Désiré, guilhermevp: FieldItemBase type hints DataDefinitionInterface but requires ComplexDataDefinitionInterface
parent
e182007f0b
commit
893e3799a9
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue