DrupalCodeGenerator\Command\ModuleGenerator class missing

Created on 27 May 2022, almost 3 years ago
Updated 18 May 2023, almost 2 years ago

Problem/Motivation

After upgrading from 2.5.0 to 3.2.0 I get the following error when attempting a drush updb:

Error: Class 'DrupalCodeGenerator\Command\ModuleGenerator' not found in /app/docroot/modules/contrib/hook_event_dispatcher/src/Generators/EventGenerator.php on line 11

Steps to reproduce

Upgrading this module from 2.5.0 to 3.2.0, then run drush updb.

Proposed resolution

Looking closer at this error, I realised that the missing class is part of a newer version of the chi-teck/drupal-code-generator.
Drush 10 requires ^1.32.1 of this package, which doesn't contain that class.
Drush 11 requires ^2.4 of this package, which contain that class.

I was on Drush 10 so I thought I will upgrade to Drush 11 and that will fix the issue. And it did :-) But now I have a the following error:

Error: Class 'DrupalCodeGenerator\Command\BaseGenerator' not found in /app/docroot/modules/contrib/hook_event_dispatcher/src/Generators/LegacyEventGenerator.php on line 14

As it seems that now the DrupalCodeGenerator\Command\BaseGenerator has been removed from that package.

🐛 Bug report
Status

Fixed

Version

3.0

Component

Code

Created by

🇬🇧United Kingdom thomas.lobjoie

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024