Skip to content

Add TelephoneItem field type stub - #1073

Open
hanming5 wants to merge 1 commit into
mglaman:mainfrom
hanming5:366-telephone-field-stubs
Open

hanming5 wants to merge 1 commit into
mglaman:mainfrom
hanming5:366-telephone-field-stubs

Conversation

@hanming5

@hanming5 hanming5 commented Nov 6, 2026 •

Copy link
Copy Markdown

Fixes #366

Adds a stub for \Drupal\telephone\Plugin\Field\FieldType\TelephoneItem so its value property is typed. This follows the same pattern as the PathItem stub in #1007.

TelephoneItem::propertyDefinitions() declares a single required string property (value), so the stub declares @property string $value, which matches the existing EmailItem stub.

Changes

  • New stubs/Drupal/telephone/Plugin/Field/FieldType/TelephoneItem.stub
  • New type assertions for TelephoneItem in tests/src/Type/data/field-types.php

Testing

  • php vendor/bin/phpunit: 892 tests pass (Drupal 11.4, PHP 8.3)
  • php vendor/bin/phpcs and php vendor/bin/phpstan analyze: no errors
  • With the stub removed, FieldTypesTest fails on the new $telephone_field->value assertion

@hanming5
hanming5 force-pushed the 366-telephone-field-stubs branch from 19474cc to 20ce1fa Compare November 6, 2026 09:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

telephone.module field type stubs

1 participant