Needs review
Project:
Drupal core
Version:
main
Component:
CLI system
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
27 Jun 2026 at 16:28 UTC
Updated:
13 Jul 2026 at 21:30 UTC
Jump to comment: Most recent
Invokable commands don't show their usage examples in their help. This is a bug in the console compiler pass.
Run dr quick-start -h and note that usages are not shown.
composer install in testing environment./vendor/bin/dr to list commands. Copy output to a file.COMPOSER_ROOT_VERSION=dev-main composer update -W./vendor/bin/dr to list commands. Compare output to previous invocation of that command.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.
Test against Symfony 8.1 - #3607060: ConsoleCompilerPass incompatible with symfony/console ≥ 8.1
None
None
None
None
N/A
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
Comment #2
moshe weitzman commentedComment #4
ressaThanks, 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_uiandex:install claro) are omitted without this patch. So functionally this is RTBC, maybe someone else can review the code?Comment #5
smustgrave commentedCame here from #3607060: ConsoleCompilerPass incompatible with symfony/console ≥ 8.1
This seems fine but maybe a follow up to make that more dynamic? Example what if another attribute is added, someone will have to remember to udpate this snippet right?
Can't run the test-only job so did it locally
btw SLOW kernel test, least locally.
per the manual test in #4 also this appears to be working.
Comment #6
mradcliffeI added some testing instructions related to Symfony 8.1.
However, I was running
./vendor/bin/dr quick-start -hon a clean core checkout and it displayed the usage already?Are there specific steps to reproduce?
Comment #7
mradcliffeOn de0a865f3a8, with either environment:
- cloned core directly
- using core/recommended-project (via joachim-n/drupal-core-development-project)
Comment #8
xmacinfoIn your sample, the
quick-start --helpshows theusage, but not thehelppart.A command that shows both
usageandhelpislist:Not sure if we need an help
blockfor each command.Comment #9
moshe weitzman commentedThat would depend on what change we would be reacting to Symfony Console. In current Console, the code here is sufficient.
quick-start's help output looks OK to me. It doesn't have any long-form help. Sorry I picked an incorrect command for testing this. A better example is in #3594334: Add a module and theme install command - it not showing its 3 usages when you run
vendor/bin/dr ex:install -h. The usages do show when you layer this MR on top. If that sounds like a pain to test, lets get that one in :)