Skip to content

1.1.11

Compare
Choose a tag to compare
@mglaman mglaman released this 18 Feb 21:34
· 348 commits to main since this release
57b5b16

Entity field analysis improvements

Field types provided by Drupal core have been stubbed to provide @property annotations. If you have a field value and it has been type hinted, PHPStan will not complain about accessing a non-existent property.

Example:

// EntityReferenceItem.
$entity_reference_field = $node->get('field_entity_reference')->first();
assert($entity_reference_field instanceof EntityReferenceItem);
assertType(EntityReferenceItem::class, $entity_reference_field);
assertType('int|string', $entity_reference_field->target_id);
assertType('Drupal\Core\Entity\EntityInterface', $entity_reference_field->entity);

Updated deprecated global constants

Drupal 9.3.x and 9.4.x deprecated more global constants. The rule to check for these has been updated.

What's Changed

New Contributors

Full Changelog: 1.1.10...1.1.11