PHP fatal error on activation

Created on 4 February 2025, 19 days ago

Problem/Motivation

I installed Migrate Wizard and dependencies through Composer. When I activated the module, the following error occurred:
PHP Fatal error: Type of Drupal\migrate_wizard\Form\BaseFormFields::$typedConfigManager must be Drupal\Core\Config\TypedConfigManagerInterface (as in class Drupal\Core\Form\ConfigFormBase) in /web/modules/contrib/migrate_wizard/src/Form/BaseFormFields.php on line 23
I tried via Drush or UI, but that doesn't matter. The module shows as enabled, but doesn't seem to work (no config pages)

Also any Drush action afterwards and some admin pages give the same error.

Environment details:
Drupal 11.1.1
PHP 8.3.11
MariaDB 10.11.6

🐛 Bug report
Status

Active

Version

3.0

Component

Code

Created by

🇳🇱Netherlands dries arnolds 🇳🇱 Amsterdam

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @dries arnolds
  • Merge request !24#Issue 3504217:Fix php fatal error. → (Open) created by Unnamed author
  • 🇮🇳India kulpratap2002

    When we installed the module in Drupal 11, the following error occurred:

    PHP Fatal error:  Type of Drupal\migrate_wizard\Form\BaseFormFields::$typedConfigManager 
    must be Drupal\Core\Config\TypedConfigManagerInterface (as in class Drupal\Core\Form\ConfigFormBase)
    This happened because Drupal 11 enforces stricter type-checking. The BaseFormFields class extends ConfigFormBase, which already defines $typedConfigManager as an instance of TypedConfigManagerInterface.

    However, in the module's code, the property was declared without a type:

    protected $typedConfigManager = NULL;

    This meant that when Drupal tried to validate the type against the parent class (ConfigFormBase), it found a mismatch, causing the fatal error.

    Please review.
    Thanks

Production build 0.71.5 2024