Problem/Motivation

We should deprecate the legacy file_system_settings_submit() form submit handler and move it to the only place it is used in \Drupal\file\Hook\FileHooks.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

Issue fork drupal-3534092

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
smustgrave’s picture

Status: Needs review » Reviewed & tested by the community

Seems like a good deprecation

nicxvan’s picture

Status: Reviewed & tested by the community » Needs work

https://www.drupal.org/project/drupal/issues/3514161

Here are some details, I'll try to connect with berdir and build a list of best practices.

kim.pepper’s picture

Status: Needs work » Needs review

Interesting. I'm not sure how autowired classes will work when using a classname. I was sure they were for static methods, but lets see what the tests say.

nicxvan’s picture

I'm beginning to wonder if these belong in a helper class as a static callback.

kim.pepper’s picture

I changed this to a static method, but seems strange to me that a submit handler must be static.

nicxvan’s picture

To be clear the concern I think berdir raises is memory usage, not whether it works.

The way you had it will work, but the whole object is stored.

nicxvan’s picture

One final suggestion.

I think you're good to self rtbc once that is in I was about to when I noticed it was method not function.

I think the deprecation is a courtesy, it's a submit callback.

Versions are right.

Technically the use statement ordering is out of scope, but a separate issue for that is unnecessary and this change is small enough it makes sense to handle here as well.

kim.pepper’s picture

Applied suggestion and self-RTBC as per #10

kim.pepper’s picture

Status: Needs review » Reviewed & tested by the community

  • catch committed 85452547 on 11.x
    Issue #3534092 by kim.pepper, nicxvan: Deprecate...
catch’s picture

Status: Reviewed & tested by the community » Fixed

Committed/pushed to 11.x, thanks!

Status: Fixed » Closed (fixed)

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

kim.pepper’s picture

quietone’s picture

I published the CR. The mistake about the class, fixed in #3540101: Deprecated file_system_settings_submit() calls settingsSubmit() on wrong class was not in a release so the CR can stay as is.