drush
drush copied to clipboard
Register some core commands in Drush application
That would make a bit easier for developers to use them.
Also it would be possible to run those commands from any location within Drupal directory when Drush launcher is installed.
https://git.drupalcode.org/project/drupal/-/tree/9.5.x/core/lib/Drupal/Core/Command
I think the following commands are worth to be registred in Drush.
- GenerateTheme
- Server
- QuickStart
- Server
I see some value, but I worry about support. Its confusing for feature requests and bug reports to come into Drush project but be unable to act on them. Also the commands are unlikely to be documented as well as native Drush commands.
Also, you've listed server twice, and thats a dupe of runserver, right?
Quickstart was in drush core for years but got booted as compound commands like that are hard to maintain.
generateTheme overlaps with DCG so lets figure out what to do there.
The tentative plan is to bring GenerateTheme into Drush but not the others. We will also stop showing DCG generate theme at same time. No timetable on this.
What do you think about adding some configuration items that would allow users to extend the PSR-4 namespace discovery to include other namespaces? We could default to all classes in the namespace, but allow for an optional filter. We could default to including only GenerateTheme if the config item is not set. I know there is a certain downside to having too much config, but on the flip side, I feel reluctant to hardcode just one core command.
If there is interest in this approach, I'll make a PR.
I dont think enough users would configure it. At that point, just use the command directly (i.e. not via Drush).
Actually, moving core theme generator under drush generate namespace would be tricky. generate-theme has quite a lot of own options that would become available to all generators if we support them. Also some of them may overlap with global Drush options.
I think it's not worth the effort. I vote for closing this issue.
DCG probably needs to drop own "generate theme" command in favor of the one from Drupal core. Closing this for now.