PHP fatal error in SettingsForm under Drupal 10.2

Created on 7 February 2024, 10 months ago
Updated 8 February 2024, 10 months ago

Problem/Motivation

The following PHP fatal error occurs in geocoder 4.23 when running under Drupal 10.2:

PHP Fatal error: Type of Drupal\geocoder\Form\SettingsForm::$typedConfigManager must be ?Drupal\Core\Config\TypedConfigManagerInterface (as in class Drupal\Core\Form\ConfigFormBase) in /var/www/html/web/modules/contrib/geocoder/src/Form/SettingsForm.php on line 0

This happens because core has introduced its own $typedConfigManager property into the base ConfigFormBase, with a different type signature.

Steps to reproduce

Install geocoder 4.23 on Drupal 10.2

Proposed resolution

In the short term, change the property definition to match the type definition in the base class.

Once 10.2 is the minimum supported version, remove the $typedConfigManager property from the SettingsForm entirely, and rely on the new property in the base class instead.

🐛 Bug report
Status

Closed: duplicate

Version

4.23

Component

Code

Created by

🇬🇧United Kingdom JeremySkinner

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