From 63cebe7ec43f6c69f330bf5faffedddb83170030 Mon Sep 17 00:00:00 2001
From: Dave Long <dave@longwaveconsulting.com>
Date: Wed, 16 Aug 2023 21:50:16 +0100
Subject: [PATCH] Issue #3378657 by dineshkumarbollu, gorkagr, smustgrave:
 Duplicate declaration of $context in WidgetBase

(cherry picked from commit 9f1ef0f4aafc1785a756c3c49f009534c05385e6)
---
 core/lib/Drupal/Core/Field/WidgetBase.php | 9 ---------
 1 file changed, 9 deletions(-)

diff --git a/core/lib/Drupal/Core/Field/WidgetBase.php b/core/lib/Drupal/Core/Field/WidgetBase.php
index 39daf849aa8e..92d1c46ca3ac 100644
--- a/core/lib/Drupal/Core/Field/WidgetBase.php
+++ b/core/lib/Drupal/Core/Field/WidgetBase.php
@@ -111,15 +111,6 @@ public function form(FieldItemListInterface $items, array &$form, FormStateInter
       $elements = $this->formMultipleElements($items, $form, $form_state);
     }
 
-    // Allow modules to alter the field multi-value widget form element.
-    // This hook can also be used for single-value fields.
-    $context = [
-      'form' => $form,
-      'widget' => $this,
-      'items' => $items,
-      'default' => $this->isDefaultValueWidget($form_state),
-    ];
-
     // Populate the 'array_parents' information in $form_state->get('field')
     // after the form is built, so that we catch changes in the form structure
     // performed in alter() hooks.
-- 
GitLab