Problem

Documented type for WidgetBaseInterface::flagErrors() parameter $violations is wrong

Proposed resolution

Fix.

Remaining tasks

-

User interface changes

-

API changes

-

CommentFileSizeAuthor
#4 d8_validation_docu.patch961 bytesfago
#1 d8_validation_docu.patch949 bytesfago
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

fago’s picture

Status: Active » Needs review
FileSize
949 bytes
jibran’s picture

Status: Needs review » Reviewed & tested by the community
Issue tags: +Quick fix
xjm’s picture

Status: Reviewed & tested by the community » Needs work
+++ b/core/lib/Drupal/Core/Field/WidgetBaseInterface.php
@@ -62,8 +62,8 @@ public function extractFormValues(FieldItemListInterface $items, array $form, Fo
-   * @param \Symfony\Component\Validator\ConstraintViolationListInterface|\Symfony\Component\Validator\ConstraintViolationInterface[] $violations
-   *   The constraint violations that were detected.
+   * @param \Symfony\Component\Validator\ConstraintViolationListInterface
+   *   A list of constraint violations to flag.

Well, we lost the parameter name. ;) (A $violations at the end.)

fago’s picture

Status: Needs work » Needs review
FileSize
961 bytes

ops! Corrected that.

pjbaert’s picture

Status: Needs review » Reviewed & tested by the community

@fago processed #3 in this patch.
This patch can go back to rtbc

xjm’s picture

Status: Reviewed & tested by the community » Fixed

This issue only changes documentation, so per https://www.drupal.org/core/beta-changes, this can be completed any time during the Drupal 8 beta phase.

I also read through the implementations and confirmed it's not expected for it to be an array.

Committed and pushed to 8.0.x. Thanks!

  • xjm committed 847fd6b on 8.0.x
    Issue #2492835 by fago: Documented type for WidgetBaseInterface::...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.