drupal-code-generator
drupal-code-generator copied to clipboard
Parent QuestionHelper class is instantiated in some cases and causes a fatal error
This error happens when trying to run drush mi or drush migration. I realize these are not proper aliases for the migration command, but this should fail gracefully, e.g. trying to run drush migrate.
PHP Fatal error: Uncaught TypeError: DrupalCodeGenerator\Style\GeneratorStyle::__construct(): Argument #3 ($question_helper) must be of type DrupalCodeGenerator\Helper\QuestionHelper, Symfony\Component\Console\Helper\QuestionHelper given, called in /var/www/html/vendor/chi-teck/drupal-code-generator/src/Command/Generator.php on line 106 and defined in /var/www/html/vendor/chi-teck/drupal-code-generator/src/Style/GeneratorStyle.php:39
I can not reproduce this. Tested with Drupal 10.1 and Drush 12.
The project I experienced this on uses Drush 11. I'll run tests on other projects to narrow down how to reproduce this.
Drush 11 is the version experiencing this issue. Drush 12 does fail gracefully.
Closing as Drush 11 is not supported anymore.