Redirect to thank you page can be simplified

Created on 10 April 2025, about 1 month ago

Problem/Motivation

This is a very simple change. In the VerifyEmailForm, when the form is submitted, the setRedirectUrl method is used, and a Url object is created from the route. This could be simplified to a setRedirect, which takes the route name as its parameter, so the Url object is not needed.

Proposed resolution

In the /src/Form/VerifyEmailForm file, find the line:

$form_state->setRedirect(Url::fromRoute('verify_email.' . $entity->id() . '.thanks'));

Change to:

$form_state->setRedirect('verify_email.' . $entity->id() . '.thanks');

Also the use statement for Url at the top of the file can be removed.

Remaining tasks

  • Make the change above.
  • Verify tests pass.

User interface changes

None

API changes

None

Data model changes

None

📌 Task
Status

Active

Version

1.0

Component

Code

Created by

🇮🇪Ireland lostcarpark

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024