Closed adamziel closed 1 year ago
Thanks for the suggestion, @adamziel !
Here's where the db check was added originally:https://github.com/wp-cli/wp-cli/pull/484
I suspect the mysql
executable was used because wpdb.php
isn't available yet. It should be fine to switch over if we can, though.
@adamziel @danielbachhuber I opened a PR https://github.com/wp-cli/config-command/pull/158 with this change.
cc @dmsnell
Description
Testing the MySQL connection via
new PDO()
ormysqli_connect()
would make theconfig create
command more portable. At the moment, the connection test requires support for aproc_open
function and a shellmysql
client. Both are problematic in the context of WebAssembly WordPress Playground.https://github.com/wp-cli/config-command/blob/965be26705e67dc1438b6a8f81232d73f4e95db4/src/Config_Command.php#L164-L166