Add support for Drupal Code Generator version 3 (required for drush 12)

Created on 30 May 2023, over 1 year ago
Updated 31 July 2024, 4 months ago

Problem/Motivation

First RCs of drush 12 have appeared and they require DCG v3. This module requires
DrupalCodeGenerator\Command\Plugin\PluginGenerator to be present so it can't be installed alongside drush 12.

Steps to reproduce

Setup a drupal installation with this module and drush 12 then run a drush command like drush cr to see a fatal error:
Error: Class "DrupalCodeGenerator\Command\Plugin\PluginGenerator" not found

Proposed resolution

Find a way to ignore the v2 service definition (drush.services.yml) and create a new class for v3 support, hopefully autodiscovered just like drush commands.

Remaining tasks

Code a solution

User interface changes

None

API changes

None

Data model changes

None

✨ Feature request
Status

Active

Version

2.0

Component

Code

Created by

πŸ‡ͺπŸ‡ΈSpain rodrigoaguilera Barcelona

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

Comments & Activities

  • Issue created by @rodrigoaguilera
  • πŸ‡ΊπŸ‡ΈUnited States brad.bulger

    As of 2.3.0 at least, I'm running this module in a Drupal 10 installation with Drush 12.5.2.0, and I am not having any problems using drush. On the other hand, Drush doesn't see this module's generators at all. I started to try to write a new version but didn't get very far.

    Should this issue be closed and a new one opened for the task of upgrading the generator code? Or repurpose this one? It matches the title but not the current description.

Production build 0.71.5 2024