TypedConfigManagerInterface. Optional in 10.2 but required in 11.0

Created on 2 October 2024, 3 months ago

Problem/Motivation

If the module was installed via Composer and activated via Drupal, an error occurs when calling the configuration interface (/admin/config/media/glightbox).

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

Steps to reproduce

- install latest Version of Drupal (11.0.4)
- install Glightbox module (1.0.8)
- enable GLightbox module in Drupal backend
- call up the Glightbox module configuration interface (/admin/config/media/glightbox)

Proposed resolution

The \Drupal\Core\Form\ConfigFormBase::__construct now accepts a $typedConfigManager argument. This argument must be an instance of \Drupal\Core\Config\TypedConfigManagerInterface. It is optional in 10.2 and will be required in 11.0. ( https://www.drupal.org/node/3404140 )

Remaining tasks

Classes extending ConfigFormBase that do override the constructor will need to update this by Drupal 11.
(File concerned: /glightbox/src/FormGLightboxSettingsForm.php)

🐛 Bug report
Status

Active

Version

1.0

Component

Code

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