Problem/Motivation

We should deprecate the legacy file_managed_file_submit() form submit handler and move to the only place it is used in \Drupal\file\Element\ManagedFile.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

Issue fork drupal-3534089

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

kim.pepper created an issue. See original summary.

kim.pepper’s picture

Status: Active » Needs review
kul.pratap’s picture

I have applied the MR on a fresh Drupal 11.x site and confirmed the following through the UI:

  • Created a content type with a File field and tested upload and remove functionality. Everything worked as expected.
  • Repeated the test with an Image field — both upload and remove actions work correctly.
  • Verified behavior for single and multi-value fields.
  • Tested required field validation by removing the uploaded file — validation triggers as expected.
  • Confirmed no errors in the PHP logs or JavaScript console.
  • Verified that file_managed_file_submit() is now deprecated and the logic is moved to \Drupal\file\Element\ManagedFile::submit(), maintaining BC correctly.
  • Everything works as expected, and the code looks clean and standards-compliant.

Marking this issue RTBC.

Thanks!

kul.pratap’s picture

Status: Needs review » Reviewed & tested by the community
needs-review-queue-bot’s picture

Status: Reviewed & tested by the community » Needs work
StatusFileSize
new91 bytes

The Needs Review Queue Bot tested this issue. It no longer applies to Drupal core. Therefore, this issue status is now "Needs work".

This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.

Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.

kim.pepper’s picture

Status: Needs work » Reviewed & tested by the community

Rebased on 11.x so back to RTBC

astonvictor’s picture

I checked and it was updated in all the required places
+1 RTBC

  • catch committed 2651395a on 11.3.x
    Issue #3534089 by kim.pepper, kul.pratap: Deprecate...
catch’s picture

Version: 11.x-dev » 11.3.x-dev
Status: Reviewed & tested by the community » Fixed

Committed/pushed to 11.x and cherry-picked to 11.3.x, thanks!

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

  • catch committed ac074334 on 11.x
    Issue #3534089 by kim.pepper, kul.pratap: Deprecate...
kim.pepper’s picture

Published the CR

quietone’s picture

Update the version info in the change record.

Status: Fixed » Closed (fixed)

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