diff -u b/core/modules/field/field.api.php b/core/modules/field/field.api.php --- b/core/modules/field/field.api.php +++ b/core/modules/field/field.api.php @@ -711,11 +711,11 @@ /** * Perform alterations on Field API widget types. * - * @param $info + * @param array $info * Array of informations on existing widget types, as collected by the * annotation discovery mechanism. */ -function hook_field_widget_info_alter(&$info) { +function hook_field_widget_info_alter(array &$info) { // Add a setting to a widget type. $info['text_textfield']['settings'] += array( 'mymodule_additional_setting' => 'default value', diff -u b/core/modules/field/field.info.inc b/core/modules/field/field.info.inc --- b/core/modules/field/field.info.inc +++ b/core/modules/field/field.info.inc @@ -451,12 +451,12 @@ /** * Returns information about field widgets from AnnotatedClassDiscovery. * - * @param $widget_type + * @param string $widget_type * (optional) A widget type name. If omitted, all widget types will be * returned. * - * @return - * Either a single widget type description, as provided by class annotations + * @return array + * Either a single widget type description, as provided by class annotations, * or an array of all existing widget types, keyed by widget type name. */ function field_info_widget_types($widget_type = NULL) { diff -u b/core/modules/field/lib/Drupal/field/FieldInstance.php b/core/modules/field/lib/Drupal/field/FieldInstance.php --- b/core/modules/field/lib/Drupal/field/FieldInstance.php +++ b/core/modules/field/lib/Drupal/field/FieldInstance.php @@ -15,6 +15,8 @@ public $definition; /** + * The widget object used for this instance. + * * @var Drupal\field\Plugin\Type\Widget\WidgetInterface */ protected $widget;