Skip to content

Global commands conflict with project-level add-ons (ddev-drupal-contrib) #53

@tormi

Description

@tormi

Problem

The add-on installs 13 commands into the global ~/.ddev/commands/ directory. These commands use generic ## Usage: names like phpcs, phpunit, phpstan, and phpcbf.

This causes conflicts with any project-level add-on that registers the same usage names. For example, when using ddev-drupal-contrib which provides its own phpcs, phpunit, phpstan, and phpcbf commands, every ddev invocation produces warnings:

Command 'wunderio-core-phpcbf.sh' cannot have usage 'phpcbf [options] [path]' because it is already in use by command 'phpcbf', skipping ~/.ddev/commands/web/wunderio-core-phpcbf.sh
Command 'wunderio-core-phpcs.sh' cannot have usage 'phpcs' because it is already in use by command 'phpcs', skipping ~/.ddev/commands/web/wunderio-core-phpcs.sh
Command 'wunderio-core-phpstan.sh' cannot have usage 'phpstan' because it is already in use by command 'phpstan', skipping ~/.ddev/commands/web/wunderio-core-phpstan.sh
Command 'wunderio-core-phpunit.sh' cannot have usage 'phpunit' because it is already in use by command 'phpunit', skipping ~/.ddev/commands/web/wunderio-core-phpunit.sh

These warnings appear on every ddev command (not just the conflicting ones), including ddev exec, ddev start, etc. — across all DDEV projects on the machine.

Expected behavior

Add-on commands should be installed at the project level (.ddev/commands/), not globally (~/.ddev/commands/). Global installation means these commands affect every DDEV project, even those that don't use Wunderio's tooling.

Workaround

Manually remove the global commands:

rm ~/.ddev/commands/web/wunderio-core-*.sh
rm ~/.ddev/commands/host/wunderio-core-*.sh

Affected commands

11 web commands and 2 host commands are installed globally:

  • wunderio-core-phpcs.sh (Usage: phpcs)
  • wunderio-core-phpunit.sh (Usage: phpunit)
  • wunderio-core-phpstan.sh (Usage: phpstan)
  • wunderio-core-phpcbf.sh (Usage: phpcbf)
  • wunderio-core-grumphp.sh
  • wunderio-core-codeception.sh
  • wunderio-core-commit-internal.sh
  • wunderio-core-regenerate-phpunit-config.sh
  • wunderio-core-pmu.sh
  • wunderio-core-yq.sh
  • wunderio-core-twig-debug.sh
  • wunderio-core-commit.sh (host)
  • wunderio-core-syncdb.sh (host)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions