Fatal error: Class SubFormState contains 2 abstract methods setIgnoreDestination

Created on 18 December 2023, 11 months ago
Updated 2 January 2024, 11 months ago

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;
  }
๐Ÿ“Œ Task
Status

Fixed

Version

1.1

Component

Code

Created by

๐Ÿ‡ฉ๐Ÿ‡ชGermany fox_01

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