Trying to add credentials results in a fatal error

Created on 2 January 2025, 7 days ago

Problem/Motivation

Enabling the module and trying to get to the credentials screen results in this fatal error:

ArgumentCountError: Too few arguments to function Drupal\Core\Form\ConfigFormBase::__construct(), 1 passed in /var/www/html/docroot/modules/contrib/config_patch_gitlab_api/src/Form/ConfigPatchGitlabApiCredentialsForm.php on line 42 and exactly 2 expected in Drupal\Core\Form\ConfigFormBase->__construct() (line 43 of core/lib/Drupal/Core/Form/ConfigFormBase.php).

Steps to reproduce

Enable the module and navigate to the credentials screen in Drupal 11.

Proposed resolution

ConfigFormBase now expects two parameters on construction, we need to add the second argument:

  public function __construct(
    ConfigFactoryInterface $config_factory,
    TypedConfigManagerInterface $typedConfigManager,
    StateInterface $state,
    ConfigPatchGitlabClientFactory $config_patch_gitlab_client_factory
  ) {
    parent::__construct($config_factory, $typedConfigManager);
    $this->state = $state;
    $this->configPatchGitlabClientFactory = $config_patch_gitlab_client_factory;
  }

Remaining tasks

User interface changes

API changes

Data model changes

πŸ› Bug report
Status

Active

Version

3.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States kevinquillen

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