Skip to content

'config:export --help' includes warning about 'Undefined array key "description" HelpCLIFormatter.php:118' #5224

@maxstarkenburg

Description

@maxstarkenburg

Describe the bug
When running drush cex --help (or similar aliases) with drush 11.1.1, the output includes [warning] Undefined array key "description" HelpCLIFormatter.php:118. I'm not able to reproduce on a different site/container using drush 10.x, nor with other commands like drush cim.

To Reproduce

  • Use drush 11.1.1 (I didn't test other drush 11.x, and was unable to reproduce in drush 10.3.6 or 10.6.2).
  • Run drush cex -h.

Expected behavior

  • Lack of [warning]
  • Lack of wondering if I did something wrong, or if something about the config state of the site is messed up, or ... :-)

Actual behavior

Export Drupal configuration to a directory.

Examples:
 drush config:export               Export configuration files to the site's config directory.                  
 drush config:export --destination Export configuration; Save files in a backup directory named config-export. 

Options:
 [warning] Undefined array key "description" HelpCLIFormatter.php:118
 --add                       Run `git add -p` after exporting. This lets you choose which config changes to sync for commit.                      
 --commit                    Run `git add -A` and `git commit` after exporting. This commits everything that was exported without prompting.      
 --message=MESSAGE           Commit comment for the exported configuration. Optional; may only be used with --commit.                             
 --destination[=DESTINATION] An arbitrary directory that should receive the exported files. A backup directory is used when no value is provided. 
 --diff                      Show preview as a diff, instead of a change list.                                                                    
 --format[=FORMAT]                                                                                                                                

Aliases: cex, config-export

Workaround
Pretend I didn't see it and cross my fingers it's harmless.

System Configuration

Q A
Drush version? 11.1.1
Drupal version? 9.4.5
PHP version 8.0.18 (cli)
OS? Mac 12.5.1 but run in a Docker container running Alpine Linux 3.15.4

Additional information
This seems pretty similar to #4827, but I didn't see anything obviously similar when looking in the analogous comment block in src/Drupal/Commands/config/ConfigExportCommands.php (looked pretty similar to what's in 10.x), so dunno if the fault is indeed closer to src/Commands/help/HelpCLIFormatter.php:118 or what (this is also like only my 2nd time actually peeking at drush's code).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions