drupal-code-generator icon indicating copy to clipboard operation
drupal-code-generator copied to clipboard

Parent QuestionHelper class is instantiated in some cases and causes a fatal error

Open nmangold opened this issue 2 years ago • 3 comments

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

nmangold avatar Sep 07 '23 16:09 nmangold

I can not reproduce this. Tested with Drupal 10.1 and Drush 12.

Chi-teck avatar Sep 09 '23 13:09 Chi-teck

The project I experienced this on uses Drush 11. I'll run tests on other projects to narrow down how to reproduce this.

nmangold avatar Sep 09 '23 13:09 nmangold

Drush 11 is the version experiencing this issue. Drush 12 does fail gracefully.

nmangold avatar Sep 09 '23 13:09 nmangold

Closing as Drush 11 is not supported anymore.

Chi-teck avatar Apr 11 '24 03:04 Chi-teck