Skip to content

Provide stub files for field types in core provided optional modules #359

Open
@dpi

Description

@dpi

#342 #344 added stubs for field types which are always available with Drupal.

It'd be great if field types in Drupal in optional [non-test] modules were also hinted

eg

text.module:

\Drupal\text\Plugin\Field\FieldType\TextWithSummaryItem
\Drupal\text\Plugin\Field\FieldType\TextItem
\Drupal\text\Plugin\Field\FieldType\TextLongItem

options.module:

\Drupal\options\Plugin\Field\FieldType\ListStringItem
\Drupal\options\Plugin\Field\FieldType\ListIntegerItem
\Drupal\options\Plugin\Field\FieldType\ListFloatItem

etc, etc

For writing field type stubs, see the examples:

Official docs: https://phpstan.org/user-guide/stub-files

Metadata

Metadata

Assignees

No one assigned

    Labels

    stub filesCreating stub files to extend phpDoc or types

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions