Problem/Motivation
When saving form admin/config/people/authorization/profile/ldap_to_drupal_roles
The error occures
Fatal error: Class Drupal\authorization\Form\SubFormState contains 2 abstract methods and must therefore be declared abstract or implement the remaining methods (Drupal\Core\Form\FormStateInterface::setIgnoreDestination, Drupal\Core\Form\FormStateInterface::getIgnoreDestination) in /web/modules/contrib/authorization/src/Form/SubFormState.php on line 17
This happens after upgrading to Drupal 10.2
From FormState.php of Drupal 10.2
/**
* Determines whether the redirect respects the destination query parameter.
*
* @param bool $status
* (optional) TRUE if the redirect should take precedence over the
* destination query parameter. FALSE if not. Defaults to TRUE.
*
* @return $this
*/
public function setIgnoreDestination(bool $status = TRUE) {
$this->ignoreDestination = $status;
return $this;
}
/**
* Gets whether the redirect respects the destination query parameter.
*
* @return bool
* TRUE if the redirect should take precedence over the destination query
* parameter.
*/
public function getIgnoreDestination(): bool {
return $this->ignoreDestination;
}
Issue fork authorization-3409489
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
Comment #4
chetan 11 commentedPlease Check the above raised MR.
Comment #5
bluegeek9 commentedComment #6
bluegeek9 commentedSince SubFormState is custom, and requires a main form state, maybe something like this.
Comment #10
bluegeek9 commented