-
Notifications
You must be signed in to change notification settings - Fork 1k
Closed as not planned
Closed as not planned
Copy link
Labels
Description
Bug Report
- Yes, I reviewed the contribution guidelines.
- Yes, more specifically, I reviewed the guidelines on how to write clear bug reports.
Describe the current, buggy behavior
After an update to wp-cli version 2.11.0 I do not seem to have the --format flag on the wp db search command.
I noticed that version 2.11.0 of WP-CLI included an update to the db search command to add a --format option.
I wanted to try this out, so I did wp cli update on my local machine, but I don't seem to have this new option.
I can replicate this by installing the latest wp-cli fresh and running wp help db search
$ wp cli version
WP-CLI 2.11.0
$ wp help db search
NAME
wp db search
DESCRIPTION
Finds a string in the database.
SYNOPSIS
wp db search <search> [<tables>...] [--network] [--all-tables-with-prefix] [--all-tables] [--before_context=<num>]
[--after_context=<num>] [--regex] [--regex-flags=<regex-flags>] [--regex-delimiter=<regex-delimiter>]
[--table_column_once] [--one_line] [--matches_only] [--stats] [--table_column_color=<color_code>]
[--id_color=<color_code>] [--match_color=<color_code>]
Searches through all of the text columns in a selection of database tables for a given string, Outputs colorized
references to the string.
Defaults to searching through all tables registered to $wpdb. On multisite, this default is limited to the tables
for the current site.
OPTIONS
...
Describe how other contributors can replicate this bug
- Create a new directory using
mkdir wp-cli-testand enter it - Install wp-cli:
curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar - Run
php ./wp-cli/phar help db search - You should not see the
--formatparameter - Change directory to a WordPress installation
- Run
php <directory>/wp-cli-test/wp-cli.phar db search --format - You should see:
Error: Parameter errors:
unknown --format parameter
Describe what you expect as the correct outcome
The db search command should have a --format option/parameter
Let us know what environment you are running this on
OS: Darwin 23.5.0 Darwin Kernel Version 23.5.0: Wed May 1 20:16:51 PDT 2024; root:xnu-10063.121.3~5/RELEASE_ARM64_T8103 arm64
Shell: /bin/zsh
PHP binary: /opt/homebrew/Cellar/php@8.2/8.2.21/bin/php
PHP version: 8.2.21
php.ini used: /opt/homebrew/etc/php/8.2/php.ini
MySQL binary: /opt/homebrew/bin/mysql
MySQL version: mysql Ver 8.3.0 for macos14.2 on arm64 (Homebrew)
SQL modes:
WP-CLI root dir: phar://wp-cli.phar/vendor/wp-cli/wp-cli
WP-CLI vendor dir: phar://wp-cli.phar/vendor
WP_CLI phar path: /Users/rosswintle/side-projects/rosswintle
WP-CLI packages dir: /Users/rosswintle/.wp-cli/packages/
WP-CLI cache dir: /Users/rosswintle/.wp-cli/cache
WP-CLI global config: /Users/rosswintle/.wp-cli/config.yml
WP-CLI project config:
WP-CLI version: 2.11.0
Reactions are currently unavailable