-
Notifications
You must be signed in to change notification settings - Fork 63
Open
Labels
Description
Bug Report
Up until version 2.11.0 on MacOS and Linux, wp db query
renders a table output by default:
$ wp db query 'SELECT 1, 1, 1'
+---+---+---+
| 1 | 1 | 1 |
+---+---+---+
| 1 | 1 | 1 |
+---+---+---+
After updating to the 2.12.0, the output is no longer rendered as a table and I cannot find a flag to get a table output again:
$ wp cli update
You have version 2.11.0. Would you like to update to 2.12.0? [y/n] y
Downloading from https://github.com/wp-cli/wp-cli/releases/download/v2.12.0/wp-cli-2.12.0.phar...
md5 hash verified: a592bbf68fc5143bfad5800cb4947253
New version works. Proceeding to replace.
Success: Updated WP-CLI to 2.12.0.
$ wp db query 'SELECT 1, 1, 1'
1 1 1
1 1 1
When reverting back to 2.11.0, the table output works again:
$ wget -O ~/bin/wp https://github.com/wp-cli/wp-cli/releases/download/v2.11.0/wp-cli-2.11.0.phar
$ chmod +x ~/bin/wp
$ wp db query 'SELECT 1, 1, 1'
+---+---+---+
| 1 | 1 | 1 |
+---+---+---+
| 1 | 1 | 1 |
+---+---+---+
Expected behavior
wp db query
should format the result as an ASCII table by default, as in previous versions.
Environment
OS: Linux 5.15.0-131-generic #141-Ubuntu SMP Fri Jan 10 21:18:28 UTC 2025 x86_64
Shell: /bin/bash
PHP binary: /usr/bin/php8.0
PHP version: 8.0.30
php.ini used: /etc/php/8.0/cli/php.ini
MySQL binary: /usr/bin/mysql
MySQL version: mysql Ver 14.14 Distrib 5.7.42, for Linux (x86_64) using EditLine wrapper
SQL modes: ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
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: phar:///var/www/share/bin/wp
WP-CLI packages dir:
WP-CLI cache dir: /var/www/share/.wp-cli/cache
WP-CLI global config:
WP-CLI project config: /var/www/share/[redacted]/htdocs/wp-cli.yml
WP-CLI version: 2.12.0
Note: I tested with PHP 8.3, 8.1, and 8.0 to see whether there is a difference.
Details
-
I already checked the changelog, recent issues and PRs, but I was not able to spot what could have caused this change in behavior.
-
Yes, I reviewed the contribution guidelines.
-
Yes, more specifically, I reviewed the guidelines on how to write clear bug reports.