Skip to content

refactor: migrate commands to Drupal core's native dr CLI - #1

Merged
mohit-rocks merged 2 commits into
mainfrom
feat/native-cli-migration
Aug 24, 2026
Merged

refactor: migrate commands to Drupal core's native dr CLI#1
mohit-rocks merged 2 commits into
mainfrom
feat/native-cli-migration

Conversation

@kimpepper

@kimpepper kimpepper commented Aug 9, 2026

Copy link
Copy Markdown
Member
  • Migrates commands from Drush registration to Drupal 11.4's built-in dr CLI
  • Moves command classes from src/Drush/Commands to src/Command (Drupal\commands\Command namespace) — matches the auto-discovery convention
  • Removes the redundant console.command service definitions and the bespoke bin/commands bootstrap script, since dr auto-discovers #[AsCommand] classes with full autowiring
  • Updates docs and OpenCode tooling to invoke vendor/bin/dr instead of drush
  • Bumps core_version_requirement to ^11.4

Drops the Drush-only registration path in favour of Drupal 11.4's built-in
console CLI, which auto-discovers #[AsCommand] classes under src/Command/
with full autowiring and no services.yml entries. Moves command classes
from src/Drush/Commands to src/Command (Drupal\commands\Command namespace),
removes the now-redundant command service definitions and the bespoke
bin/commands bootstrap script, and updates docs/tooling to invoke
vendor/bin/dr instead of drush.
dr is Drupal core's own CLI, on PATH like any global tool rather than a
project-local vendor/bin/ script. Docs and command help text now just say
"dr", with 11.4+ called out where the CLI is first introduced.

@mohit-rocks mohit-rocks left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM
I tested the commands locally and commands look good.

@mohit-rocks
mohit-rocks merged commit a78f660 into main Aug 24, 2026
@mohit-rocks
mohit-rocks deleted the feat/native-cli-migration branch August 24, 2026 10:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants