wp-cli / db-command

Performs basic database operations using credentials stored in wp-config.php.
MIT License
71 stars 59 forks source link

Positional argument `<table>` in `db columns` should not be optional #208

Closed schlessera closed 3 years ago

schlessera commented 3 years ago

The positional argument <table> for the db columns command is marked as being optional. This should not be the case, as the command requires a valid table name to work correctly.

https://github.com/wp-cli/db-command/blob/ca8894aedaff762628fbd25b2bdbf9e1fab92151/src/DB_Command.php#L1464

Right now, if called without a table name, the command throws a PHP notice, instead of letting the user know a required argument is missing.