Support from Acquia helps fund testing for Drupal Acquia logo

Comments

yched’s picture

FileSize
185.38 KB

Bump ?

Status: Needs review » Needs work

The last submitted patch, field-plugins-formatters.patch, failed testing.

yched’s picture

Status: Needs work » Needs review
FileSize
200.65 KB
yched’s picture

Status: Needs review » Needs work

The last submitted patch, field-plugins-widgets-formatters-1785748-4.patch, failed testing.

yched’s picture

Status: Needs work » Needs review
FileSize
213.95 KB

With test formatters as plugins

Status: Needs review » Needs work

The last submitted patch, field-plugins-widgets-formatters-1785748-6.patch, failed testing.

yched’s picture

Status: Needs work » Needs review
FileSize
216.13 KB
yched’s picture

Lars Toomre’s picture

Status: Needs review » Needs work

None of this is critical, but just thoughts upon reviewing the patch.

+++ b/core/modules/field/field.api.phpundefined
@@ -703,84 +709,11 @@ function hook_field_is_empty($item, $field) {
  * @param $info
- *   Array of informations on widget types exposed by hook_field_widget_info()
- *   implementations.
+ *   Array of informations on existing widget types, as collected by the

Since this description is changed, can we add type hinting here?

+++ b/core/modules/field/field.attach.incundefined
@@ -108,6 +108,234 @@ const FIELD_STORAGE_INSERT = 'insert';
+  // contain data for a single field for each name, even if that field
+  // is deleted, so we reference field data via the $entity->$field_name

Possibly needs to be rewrapped for 80 chars.

+++ b/core/modules/field/field.attach.incundefined
@@ -432,6 +660,37 @@ function _field_invoke_get_instances($entity_type, $bundle, $options) {
+ * @param mixed $display
+ *   @todo

Any explanation before patch is applied?

+++ b/core/modules/field/field.info.incundefined
@@ -496,27 +366,22 @@ function field_info_field_types($field_type = NULL) {
  * @param $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
- *   hook_field_widget_info(), or an array of all existing widget types, keyed
- *   by widget type name.
+ *   Either a single widget type description, as provided by class annotations
+ *   or an array of all existing widget types, keyed by widget type name.

Can we add type hinting here?

+++ b/core/modules/field/lib/Drupal/field/FieldInstance.phpundefined
@@ -0,0 +1,222 @@
+
+  public $definition;
+
+  /**
+   * @var Drupal\field\Plugin\Type\Widget\WidgetInterface
+   */
+  protected $widget;
+
+  /**
+   * @var array
+   */
+  protected $formatters;

No descriptive text for each of these members?

yched’s picture

Status: Needs work » Needs review
FileSize
216.47 KB

@Lars Toomre: thanks, fixed those.
However, this is only an issue I use to run testbots, the real discussion happens in #1785748: Field formatters as plugins.

This should have less fails.

Status: Needs review » Needs work

The last submitted patch, field-plugins-widgets-formatters-1785748-11.patch, failed testing.

yched’s picture

Status: Needs work » Needs review
FileSize
215.55 KB

reroll against latest 8.x

Status: Needs review » Needs work

The last submitted patch, field-plugins-widgets-formatters-1785748-13.patch, failed testing.

yched’s picture

Status: Needs work » Needs review
FileSize
216.64 KB

Should be green.

Status: Needs review » Needs work

The last submitted patch, field-plugins-widgets-formatters-1785748-15.patch, failed testing.

yched’s picture

Status: Needs work » Needs review
yched’s picture

Reroll after widgets as plugins & FieldInfo went in.

Status: Needs review » Needs work

The last submitted patch, field-plugins-formatters-1785748-18.patch, failed testing.

yched’s picture

Status: Needs work » Needs review
FileSize
106.82 KB

hook_field_formatter_settings_form_alter() needed some adjustments.
This should be green.

yched’s picture

Trying the same workaround that was added in #1751234: Convert option widgets to Plugin system for 'info_alter' on new-style widgets.

yched’s picture

Er, wrong patch.

Status: Needs review » Needs work

The last submitted patch, field-plugins-formatters-1785748-20.patch, failed testing.

yched’s picture

Status: Needs work » Needs review
FileSize
121.9 KB

Doh.

swentel’s picture

Status: Needs review » Closed (fixed)

The actual patch is in.

swentel’s picture

Issue summary: View changes

Added parent issue #