Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 303135

Add array return to all hook_views_data and hook_field_views_data implementations

$
0
0

Problem/Motivation

See #3483037: [META] Add return types to hook implementations

Steps to reproduce

grep -P 'Drupal\\\\.*\\\\Hook\\\\.*:\\\\:(viewsData|fieldViewsData)\\\\\(\\\\\) has no return type specified' core/.phpstan-baseline.php

Proposed resolution

Add : array to hook_views_data and hook_field_views_data in views.api.php

Add : array to each of these:

Drupal\content_moderation\Hook\ContentModerationViewsHooks::viewsData()
Drupal\datetime\Hook\DatetimeViewsHooks::fieldViewsData()
Drupal\datetime_range\Hook\DatetimeRangeViewsHooks::fieldViewsData()
Drupal\dblog\Hook\DblogViewsHooks::viewsData()
Drupal\file\Hook\FileViewsHooks::fieldViewsData()
Drupal\history\Hook\HistoryViewsHooks::viewsData()
Drupal\image\Hook\ImageViewsHooks::fieldViewsData()
Drupal\media_library\Hook\MediaLibraryViewsHooks::viewsData()
Drupal\options\Hook\OptionsViewsHooks::fieldViewsData()
Drupal\views\Hook\ViewsViewsHooks::fieldViewsData()
Drupal\views\Hook\ViewsViewsHooks::viewsData()
Drupal\views_test_data\Hook\ViewsTestDataViewsExecutionHooks::fieldViewsData()
Drupal\views_test_data\Hook\ViewsTestDataViewsHooks::viewsData()
Drupal\views_ui_test_field\Hook\ViewsUiTestFieldViewsHooks::viewsData()

Update phpstan baseline
./vendor/bin/phpstan --configuration=core/phpstan.neon --generate-baseline=core/.phpstan-baseline.php

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet


Viewing all articles
Browse latest Browse all 303135


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>