Needs review
Project:
Drupal core
Version:
main
Component:
user.module
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
7 Sep 2026 at 20:09 UTC
Updated:
10 Sep 2026 at 22:49 UTC
Jump to comment: Most recent
Postponed on #3620912: Deprecate user.module cancel methods
From godotislate:
This can be a closure, since it's only used in one method and not relevant to the large majority of requests.
I missed seeing the same thing for the login/logout finalizers, so we can do those two and accountCancellation all as a follow up. The form class properties are fine as is, because theoretically forms can be serialized, so we can't have closure properties.
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
Comment #2
danielvezaParent ticket is merged, so this is unpostponed
Comment #3
longwaveIf we did #3398528: Add support for autowiring to controller methods then you could inject services into only the methods that need them instead of the whole class; this would make fat controllers more manageable.
Comment #5
danielvezaPushed up the initial work for this. Followed the existing patterns on core.
The only thing that was missing is that because this isn't a service, I had to setup the closures in
::create, I think this is the first instance of that. Claude helped with that part.EDIT: Ah I still had the same window opened from my last comment, so I didn't see @longwaves comment in the middle. Should we still do this?
Comment #6
longwaveMight be worth starting from the MR in #3 and then seeing how much we could thin down the UserController constructor.