Problem/Motivation

Invokable commands don't show their usage examples in their help. This is a bug in the console compiler pass.

Steps to reproduce

Run dr quick-start -h and note that usages are not shown.

Proposed resolution

Populate the service tag. This enables Symfony's \Symfony\Component\Console\DependencyInjection\AddConsoleCommandPass to find the usages and populate the console.command_loader service arguments with them.

Remaining tasks

None

User interface changes

None

Introduced terminology

None

API changes

None

Data model changes

None

Release notes snippet

N/A

Issue fork drupal-3606744

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

moshe weitzman created an issue. See original summary.

moshe weitzman’s picture

Title: Invokable commands dont show their usages » Invokable commands dont show their usages in help
Issue summary: View changes

ressa’s picture

Thanks, this patch fixes the missing Usage examples, and I can for example see how to install multiple modules, using comma-separated syntax with patch from #3594334: Add a module and theme install command, where the two examples at the bottom (ex:install views,views_ui and ex:install claro) are omitted without this patch. So functionally this is RTBC, maybe someone else can review the code?

$ dr ex:install -h
Description:
  Installs one or more modules or themes.

Usage:
  ex:install [options] [--] <extensions>
  exin
  pm:install
  pm:enable
  enable
  en
  ex:install views,views_ui
  ex:install claro
[...]