Problem/Motivation

hook_field_widget_WIDGET_TYPE_form_alter() was deprecated in favor of hook_field_widget_single_element_WIDGET_TYPE_form_alter().

Proposed resolution

  1. Replace usages of hook_field_widget_WIDGET_TYPE_form_alter() with hook_field_widget_single_element_WIDGET_TYPE_form_alter().
  2. Remove support for versions of Drupal prior to 9.2 (since that is when hook_field_widget_single_element_WIDGET_TYPE_form_alter() was introduced.
CommentFileSizeAuthor
#3 3396637-3.patch764 bytesinglesaaron
#2 3396369-2.patch1.11 KBinglesaaron
Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

inglesaaron created an issue. See original summary.

inglesaaron’s picture

StatusFileSize
new1.11 KB
inglesaaron’s picture

StatusFileSize
new764 bytes
markdorison’s picture

Title: Using Deprecated Hook for Drupal 10 » Replace deprecated/removed usage of hook_field_widget_WIDGET_TYPE_form_alter
Version: 8.x-1.7 » 8.x-1.x-dev
Priority: Normal » Major
Issue summary: View changes
Status: Active » Needs work
  • This change will require the dropping of support for versions of Drupal prior to 9.2
  • Please re-roll this change in a merge request so that GitLabCI tests will run against it.

Also, I updated the issue description with links to the supporting docs.

viren18febS made their first commit to this issue’s fork.

viren18febs’s picture

Issue summary: View changes
Status: Needs work » Needs review

Hi @markdorison

I have added above changes into MR, please review.

markdorison’s picture

Issue summary: View changes
markdorison’s picture

Status: Needs review » Reviewed & tested by the community

I am planning to commit the changes in MR 13 and create a new release. That said, these changes drop support for Drupal < 9.2. Since all of the versions we are dropping have already reached end-of-life, I don't feel it's necessary to create a new major version of the module but I wanted to share these intentions here first in case anyone would like to weigh in in one direction or another.

markdorison’s picture

Status: Reviewed & tested by the community » Fixed

Committed the changes from MR13 and I will cut a new release. Thanks for the help, and hi @inglesaaron, I am just now seeing you up there! 😁👋

//www.flaticon.com/free-icons/thank-you Thank you for your contribution! Your continued support to this project makes other volunteer contributions more sustainable.
There are multiple ways to show appreciation for the work contributed to this project including:
  • Triaging issues and adding more context to existing issues.
  • Writing documentation or patches for this project.
  • Writing blog posts or speaking about it at conferences.

Status: Fixed » Closed (fixed)

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