The FormElement is deprecated in drupal:10.3.0 and is removed from drupal:12.0.0. use \Drupal\Core\Render\Element\FormElementBase instead.

CommentFileSizeAuthor
#2 deprecated_FormElement-3461396-1.patch666 bytesiheb.attia
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

iheb.attia created an issue. See original summary.

iheb.attia’s picture

StatusFileSize
new666 bytes
iheb.attia’s picture

Status: Active » Needs review
malcomio’s picture

Status: Needs review » Reviewed & tested by the community

The patch applies cleanly, and addresses the issue.

  • chrisolof committed a1f56a41 on 2.0.x
    Issue #3461396 by iheb.attia, malcomio: Deprecated FormElement
    
chrisolof’s picture

Status: Reviewed & tested by the community » Fixed

Thank you! This change has been merged into the 2.0.x branch.

Status: Fixed » Closed (fixed)

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

felribeiro’s picture

The Drupal\Core\Render\Element\FormElementBase is avaliable from Drupal 10.3 and the module info is core_version_requirement: ^9.2 || ^10 || ^11
https://www.drupal.org/node/3436275

It is thowing this Error: Class "Drupal\Core\Render\Element\FormElementBase" not found in include() (line 36 of modules/contrib/phone_number/src/Element/PhoneNumber.php).

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

raycascella’s picture

I'm seeing the same error as felribeiro. Should this be updated to use the Drupal\config_translation\FormElementBase instead? I poked around and saw it added in other field configs. I created a fork to see if adding a patch to my installer removes the error.

Ignore me. Didn't realize our core install was still on 10.2.7!