- Issue created by @abelcain
- Status changed to Closed: duplicate
almost 2 years ago 8:48am 12 April 2023 - 🇳🇱Netherlands sutharsan
Duplicate of 🐛 Class "DrupalCodeGenerator\Command\BaseGenerator" not found RTBC
The module is not managing correctly its dependencies, at composer.json there's no entry for drupal-code-generator package (https://github.com/Chi-teck/drupal-code-generator). So when now we install version 2.3 of this module it want to use class DrupalCodeGenerator\Command\BaseGenerator at src/Generators/ExtraFieldDisplay.php.
Checking who provides that is: https://github.com/Chi-teck/drupal-code-generator
At its version 3 they had incorporated such class: https://github.com/Chi-teck/drupal-code-generator/blob/3.x/src/Command/B...
First: Your module should declare the dependency to this module if it depends on it
Second: Older versions of drupal-code-generator doesn't have that class.
Now comes the delicate part: Drush 11 is demanding version ^2.4 (https://packagist.org/packages/drush/drush#11.5.1). So one cannot have drush/drush and extra_field now working together:
- drush/drush 11.4.0 requires chi-teck/drupal-code-generator ^2.4 -> found chi-teck/drupal-code-generator[dev-master, 2.4.0, ..., 2.x-dev (alias of dev-master)] but it conflicts with your root composer.json require (^3.0).
We installed a site with:
Then we install webprofiler module and when we ran drush en webprofiler we get:
Error: Class "DrupalCodeGenerator\Command\BaseGenerator" not found in /home/abel-santos-corral/openeuropa/ema-ema-dev/web/modules/contrib/extra_field/src/Generators/ExtraFieldDisplay.php on line 14
Could you please check?
Maybe as is now the module should use any other class from drupal-code-generator and putting the dependency is possible to have it more controlled.
Closed: duplicate
2.3
Code
Duplicate of 🐛 Class "DrupalCodeGenerator\Command\BaseGenerator" not found RTBC