Problem/Motivation

See https://www.drupal.org/node/2305023#comment-8994643

Proposed resolution

Remaining tasks

User interface changes

API changes

Comments

tim.plunkett’s picture

We split it off from 'redirect' to make it easier to convert from strings to array/Url. Ideally we'd eventually finish that, and reclaim 'redirect'.

Or, we can just wait for #2225353: Convert $form_state to an object and provide methods like setError() and use $form_state->setRedirect().

jibran’s picture

Arghhh what was this issue #2105661: Add support for $form_state['redirect_route'] then. We are back to where we started. Can someone please explain to me why we are doing it again? Shall we revisit this once again when we'll have a change of heart and we'll want to change all the things to use routes? There is nothing in the issue summary here at #2305023: Rename getCancelRoute to getCancelUrl.

tim.plunkett’s picture

All of them should be $form_state->setRedirect(), and it should accept \Drupal\Core\Url.
NO ONE should care what the key is called internally.

jibran’s picture

NO ONE knows #2225353: Convert $form_state to an object and provide methods like setError() is happening or not I haven't seen any core committer signing it off. In D7 I have to create forms every other day and everyone is going to create forms in D8 as well so I care.

jibran’s picture