Skip to content

Commit

Permalink
refactor: add drush and composer command aliases, fixes ddev#6642 (
Browse files Browse the repository at this point in the history
…ddev#6649) [skip ci]

Co-authored-by: Stanislav Zhuk <[email protected]>
  • Loading branch information
TravisCarden and stasadev authored Oct 29, 2024
1 parent 7c942f7 commit 3fed223
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions cmd/ddev/cmd/composer.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ var ComposerCmd = &cobra.Command{
Long: `Executes a Composer command at the Composer root in the web container. Generally,
any Composer command can be forwarded to the container context by prepending
the command with 'ddev'.`,
Aliases: []string{"co"},
Example: `ddev composer install
ddev composer require <package>
ddev composer outdated --minor-only
Expand Down
4 changes: 4 additions & 0 deletions docs/content/users/usage/commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,8 @@ ddev clean my-project my-other-project

## `composer`

*Alias: `co`.*

Executes a [Composer command](../usage/developer-tools.md#ddev-and-composer) within the web container.

`ddev composer create` is a special command that is an adaptation of `composer create-project`. See [DDEV and Composer](../usage/developer-tools.md#ddev-and-composer) for more information.
Expand Down Expand Up @@ -705,6 +707,8 @@ ddev dotenv set .ddev/.env.redis --redis-tag 7-bookworm

## `drush`

*Alias: `dr`.*

Run the `drush` command; available only in projects of type `drupal*`, and only available if `drush` is in the project. On projects of type `drupal`, `drush` should be installed in the project itself, (`ddev composer require drush/drush`). On projects of type `drupal7` `drush` 8 is provided by DDEV.

```shell
Expand Down
1 change: 1 addition & 0 deletions pkg/ddevapp/global_dotddev_assets/commands/web/drush
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
## Description: Run drush CLI inside the web container
## Usage: drush [flags] [args]
## Example: "ddev drush uli" or "ddev drush sql-cli" or "ddev drush --version"
## Aliases: dr
## ProjectTypes: drupal,drupal10,drupal9,drupal8,drupal7,backdrop
## ExecRaw: true

Expand Down

0 comments on commit 3fed223

Please sign in to comment.