Part of #1971384: [META] Convert page callbacks to controllers
Convert this page callback to a new-style Form object, using the instructions on http://drupal.org/node/1800686
There is currently a wrapper method at Drupal\user\Controller\UserController::confirmCancel().
Found while working on: #1800174: Add missing type hinting to User module docblocks
Beta phase evaluation
| Issue category | Task because it is refactoring which doesn't change functionality. |
|---|---|
| Unfrozen changes | Unfrozen because it refactors deprecated code. See: #1971384: [META] Convert page callbacks to controllers |
| Disruption | Minor disruption because not many areas of code are in the business of removing user accounts. |
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | 2403729-confirm-cancel-3.patch | 8.01 KB | kim.pepper |
Comments
Comment #1
kim.pepperI will look at this.
Comment #2
kim.pepper\Drupal\user\Form\UserCancelFormwas first created in #1946466: Convert all confirm_form() in user.module and user.pages.inc to the new form interface and convert route but is not related to what this callback is for. It is for confirming cancellation via an emailed cancellation link.Comment #3
kim.pepperRemoved
user_cancel_confirm()and put logic into\Drupal\user\Controller\UserController::confirmCancelAdded some dependency injection, and used $this->redirect() from base class.
Comment #4
mile23At times like this, I wish SimpleTest tests had a @covers option and that people had used it. :-)
But the test is
Drupal\user\Tests\UserCancelTest, and it looks like it covers this behavior.So glad we can make changes like this:
Adding a beta evaluation, marking it as unfrozen because it's DX and DrupalWTF otherwise.
Comment #5
alexpottYep these wrappers should have been removed. Committed 5f2a572 and pushed to 8.0.x. Thanks!
Thanks for adding the beta evaluation to the summary.
Can someone open a follow to move the lonely theme function in user.pages.inc to user.module?
Comment #7
cosmicdreams commentedI was reading over the commit and found that the constructor's code comment wasn't updated to describe the new parameter.
Should we open a follow up issue for that?
Comment #8
alexpott@cosmicdreams sure - a new issue would be good - thanks for being eagle-eyed :)
Comment #9
kim.pepperThanks @cosmicdreams. Added follow up #2407481: Fix constructor docblock in UserController
Comment #10
kim.pepperAs per #5 created followup #2407489: Remove user.pages.inc