WP-CLI warning: version command redeclares global --debug option

Open Beginner friendly
#255 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
1/5
Estimated time
Under an hour
Newbie friendliness
85/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
php, wordpress
Domain
cli

Research direction

Read the OPTIONS docblock in src/Cli/Commands/Version.php and check how the version command handles WP-CLI's global --debug option. Remove the redundant declaration while preserving the existing debug output behavior; verify that loading BackWPup with a WP-CLI command such as wp plugin list no longer emits the warning.

Written by the indexing model from the issue text.

Description

Environment
  • BackWPup 5.7.8
  • WordPress 7.1.4
  • PHP 8.5.12
  • WP-CLI nightly 3.0.0-alpha-79914d9
Steps to reproduce
  1. Activate BackWPup.
  2. Run a WP-CLI command that loads active plugins, for example wp plugin list, using the nightly version above.
Actual behavior

The following warning is printed:

Warning: The `backwpup version` command is registering an argument '--debug' that conflicts with a global argument of the same name.

The warning also appears during unrelated commands, repeatedly adding noise to automated maintenance logs.

Running the command with --skip-plugins=backwpup removes the warning.

Expected behavior

BackWPup's CLI commands should register without warnings while retaining support for WP-CLI's global debugging option.

Likely cause

The OPTIONS docblock in src/Cli/Commands/Version.php explicitly declares [--debug], although WP-CLI already provides this option globally.

Please remove the redundant declaration while preserving the existing debug output behavior.

Dominant language
PHP
Stars
96
Forks
48
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from wp-media/backwpup

All issues in wp-media/backwpup

Similar issues

More PHP issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.